mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
I like the looks of these regexps better and alternation is expensive
This commit is contained in:
parent
1ad9816391
commit
94c43c5040
@ -291,10 +291,11 @@ class Karma(callbacks.PrivmsgCommandAndRegexp):
|
||||
"""
|
||||
name = privmsgs.getArgs(args)
|
||||
self.db.clear(channel, name)
|
||||
irc.replySuccess()
|
||||
clear = privmsgs.checkChannelCapability(clear, 'op')
|
||||
|
||||
def increaseKarma(self, irc, msg, match):
|
||||
r"^(\S+)\+\+(|\s+)$"
|
||||
r"^(\S+)\+\+(?:\s+)?$"
|
||||
channel = msg.args[0]
|
||||
if not ircutils.isChannel(channel):
|
||||
return
|
||||
@ -307,7 +308,7 @@ class Karma(callbacks.PrivmsgCommandAndRegexp):
|
||||
irc.replySuccess()
|
||||
|
||||
def decreaseKarma(self, irc, msg, match):
|
||||
r"^(\S+)--(|\s+)$"
|
||||
r"^(\S+)--(?:\s+)?$"
|
||||
channel = msg.args[0]
|
||||
if not ircutils.isChannel(channel):
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user