Karma: don't swallow potential commands
when matching patterns, !rank item++ would not get replied to since the karma matcher would hit, increment item, and then return (with no response). now it hits but lets processing continue. doing !rank item++ of course still increments item, which is probably not what you want to have happen, but i'm not sure how i feel about fixing it yet, since even if it's not what you /want/ it's probably what you /expect/.
This commit is contained in:
parent
e7a573bce1
commit
bdba8e20f1
@ -89,9 +89,11 @@ class Karma(Module):
|
||||
def do(self, connection, event, nick, userhost, what, admin_unlocked):
|
||||
"""look for karma strings at the start of messages"""
|
||||
|
||||
# don't return anything, do this attempt regardless
|
||||
if (self.karmare.search(what)):
|
||||
return self.reply(connection, event, self.handle_karma_change(connection, nick, userhost, what))
|
||||
elif (self.queryre.search(what)):
|
||||
self.handle_karma_change(connection, nick, userhost, what)
|
||||
|
||||
if (self.queryre.search(what)):
|
||||
return self.reply(connection, event, self.handle_karma_query(connection, nick, userhost, what))
|
||||
elif (self.statre.search(what)):
|
||||
return self.reply(connection, event, self.handle_stat_query(connection, nick, userhost, what))
|
||||
|
Loading…
Reference in New Issue
Block a user