From aabc8904ad39b086cd03a5a5fcb92e284fbed5e8 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Thu, 28 Oct 2010 20:46:09 -0500 Subject: [PATCH] properly handle recursion, so that the alias actually works --- modules/Karma.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/Karma.py b/modules/Karma.py index 77315b0..093ac8f 100755 --- a/modules/Karma.py +++ b/modules/Karma.py @@ -76,10 +76,9 @@ class Karma(Module): """look for karma strings at the start of messages""" if (self.karmare.match(what)): - self.handle_karma_change(connection, nick, userhost, replypath, what) - + return self.handle_karma_change(connection, nick, userhost, replypath, what) elif (self.queryre.match(what)): - self.handle_karma_query(connection, nick, userhost, replypath, what) + return self.handle_karma_query(connection, nick, userhost, replypath, what) def handle_karma_change(self, connection, nick, userhost, replypath, what): """ @@ -131,7 +130,7 @@ class Karma(Module): except sqlite3.Error as e: return self.reply(connection, replypath, "sqlite error: " + str(e)) - self.reply(connection, replypath, reply) + return self.reply(connection, replypath, reply) if __name__ == "__main__": print "Hello World"