mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
There's no need to test all of the tokens we're looking at. If the first one
is a command, bail out.
This commit is contained in:
parent
c98ac36ccc
commit
0412055a85
@ -265,11 +265,7 @@ class Infobot(callbacks.PrivmsgCommandAndRegexp):
|
||||
if self.addressed:
|
||||
try:
|
||||
tokens = callbacks.tokenize(payload)
|
||||
getCallback = callbacks.findCallbackForCommand
|
||||
commands = filter(None,
|
||||
map(lambda c, i=irc: getCallback(i, c),
|
||||
tokens))
|
||||
if commands:
|
||||
if callbacks.findCallbackForCommand(irc, tokens[0]):
|
||||
return
|
||||
else:
|
||||
payload += '?'
|
||||
|
Loading…
Reference in New Issue
Block a user