diff --git a/src/callbacks.py b/src/callbacks.py index 7b5303689..09ede63bc 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -578,10 +578,11 @@ class Privmsg(irclib.IrcCallback): if msg: try: args = tokenize(s) - for command in getCommands(args): - command = canonicalName(command) - if not findCallbackForCommand(irc, command): - return + if conf.replyWhenNotCommand: + for command in getCommands(args): + command = canonicalName(command) + if not findCallbackForCommand(irc, command): + return self.Proxy(irc, msg, args) except SyntaxError, e: irc.queueMsg(reply(msg, debug.exnToString(e)))