From 0412055a858c7fe754f3e73b174e9f4326e60d8b Mon Sep 17 00:00:00 2001 From: James Vega Date: Sat, 31 Jul 2004 06:32:01 +0000 Subject: [PATCH] There's no need to test all of the tokens we're looking at. If the first one is a command, bail out. --- plugins/Infobot.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/Infobot.py b/plugins/Infobot.py index 9b25972aa..0fcdcbf8d 100755 --- a/plugins/Infobot.py +++ b/plugins/Infobot.py @@ -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 += '?'