error reporting in karma_modify

the connection and replypath paramaters are required for graceful error reporting
This commit is contained in:
Mike Bloy 2010-11-25 11:15:37 -06:00
parent 647a2edb5c
commit a434c3738f
1 changed files with 7 additions and 7 deletions

View File

@ -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.
"""