diff --git a/src/callbacks.py b/src/callbacks.py index 637f0983d..54b3d3023 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -1081,10 +1081,6 @@ class Privmsg(irclib.IrcCallback): def __call__(self, irc, msg): # This is for later dynamic scoping. - if msg.args and irc.isChannel(msg.args[0]): - channel = msg.args[0] - else: - channel = None if msg.command == 'PRIVMSG': if self.noIgnore or not ircdb.checkIgnored(msg.prefix,msg.args[0]): self.__parent.__call__(irc, msg) diff --git a/src/irclib.py b/src/irclib.py index 8ed84d81b..3c31d37e7 100644 --- a/src/irclib.py +++ b/src/irclib.py @@ -733,6 +733,10 @@ class Irc(IrcCommandDispatcher): """Called by the IrcDriver; feeds a message received.""" msg.tag('receivedBy', self) msg.tag('receivedOn', self.network) + if msg.args and self.isChannel(msg.args[0]): + channel = msg.args[0] + else: + channel = None log.debug('Incoming message: ' + str(msg).rstrip('\r\n')) # Yeah, so this is odd. Some networks (oftc) seem to give us certain