move the karma logging into a separate method, since i'm about to reuse it in a new way
This commit is contained in:
parent
12d5425644
commit
50e45b2a0d
@ -88,9 +88,14 @@ class Karma(Module):
|
||||
key = match.group(1) if match.group(1) else match.group(2)
|
||||
value = match.group(3)
|
||||
if (value == '++'):
|
||||
value = 1;
|
||||
return self.karma_modify(key, 1, nick, userhost)
|
||||
else:
|
||||
value = -1;
|
||||
return self.karma_modify(key, -1, nick, userhost)
|
||||
|
||||
def karma_modify(self, key, value, nick, userhost):
|
||||
"""
|
||||
Go out to the database and update the karma value.
|
||||
"""
|
||||
|
||||
conn = self.get_db()
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user