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"""
|
"""look for karma strings at the start of messages"""
|
||||||
|
|
||||||
if (self.karmare.match(what)):
|
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)):
|
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):
|
def handle_karma_change(self, connection, nick, userhost, replypath, what):
|
||||||
"""
|
"""
|
||||||
@ -131,7 +130,7 @@ class Karma(Module):
|
|||||||
except sqlite3.Error as e:
|
except sqlite3.Error as e:
|
||||||
return self.reply(connection, replypath, "sqlite error: " + str(e))
|
return self.reply(connection, replypath, "sqlite error: " + str(e))
|
||||||
|
|
||||||
self.reply(connection, replypath, reply)
|
return self.reply(connection, replypath, reply)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
print "Hello World"
|
print "Hello World"
|
||||||
|
Loading…
Reference in New Issue
Block a user