error reporting in karma_modify
the connection and replypath paramaters are required for graceful error reporting
This commit is contained in:
parent
647a2edb5c
commit
a434c3738f
|
@ -109,17 +109,17 @@ class Karma(Module):
|
|||
key = match.group(1) if match.group(1) else match.group(2)
|
||||
value = match.group(3)
|
||||
if (value == '++'):
|
||||
return self.karma_modify(key, 1, nick, userhost)
|
||||
return self.karma_modify(key, 1, connection, nick, userhost, replypath)
|
||||
elif (value == '--'):
|
||||
return self.karma_modify(key, -1, nick, userhost)
|
||||
return self.karma_modify(key, -1, connection, nick, userhost, replypath)
|
||||
elif (value == '+-'):
|
||||
self.karma_modify(key, 1, nick, userhost)
|
||||
return self.karma_modify(key, -1, nick, userhost)
|
||||
self.karma_modify(key, 1, connection, nick, userhost, replypath)
|
||||
return self.karma_modify(key, -1, connection, nick, userhost, replypath)
|
||||
elif (value == '-+'):
|
||||
self.karma_modify(key, -1, nick, userhost)
|
||||
return self.karma_modify(key, 1, nick, userhost)
|
||||
self.karma_modify(key, -1, connection, nick, userhost, replypath)
|
||||
return self.karma_modify(key, 1, connection, nick, userhost, replypath)
|
||||
|
||||
def karma_modify(self, key, value, nick, userhost):
|
||||
def karma_modify(self, key, value, connection, nick, userhost, replypath):
|
||||
"""
|
||||
Go out to the database and update the karma value.
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue