diff --git a/Module.py b/Module.py index 7102051..faff8ff 100644 --- a/Module.py +++ b/Module.py @@ -166,7 +166,7 @@ class Module(object): what = addressed_re.sub('', what) try: - self.do(connection, event, nick, userhost, replypath, what, admin_unlocked) + return self.do(connection, event, nick, userhost, replypath, what, admin_unlocked) except Exception as e: print('EXCEPTION: ' + str(e)) @@ -201,11 +201,11 @@ class Module(object): return try: - self.do(connection, event, nick, userhost, replypath, what, admin_unlocked) + return self.do(connection, event, nick, userhost, replypath, what, admin_unlocked) except Exception as e: print('EXCEPTION: ' + str(e)) - def reply(self, connection, replypath, replystr): + def reply(self, connection, replypath, replystr, stop_responding=True): """ Reply over IRC to replypath or return a string with the reply. Utility method to do the proper type of reply (either to IRC, or as a return @@ -220,6 +220,8 @@ class Module(object): return replystr else: connection.privmsg(replypath, replystr) + if stop_responding: + return "NO MORE" def remove_metaoptions(self, list): """Remove metaoptions from provided list, which was probably from a config file."""