properly handle recursion, so that the alias actually works
This commit is contained in:
parent
0dfe8bcdd6
commit
aabc8904ad
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user