diff --git a/plugins/ChannelLogger/plugin.py b/plugins/ChannelLogger/plugin.py index 0abbd05e4..43d9a1175 100644 --- a/plugins/ChannelLogger/plugin.py +++ b/plugins/ChannelLogger/plugin.py @@ -190,10 +190,14 @@ def doPrivmsg(self, irc, msg): ignoreOwner=True) except KeyError: logChannelMessages = True + nick = msg.nick or irc.nick + if msg.tagged('ChannelLogger__relayed'): + (nick, text) = text.split(' ', 1) + nick = nick[1:-1] + msg.args = (recipients, text) if (noLogPrefix and text.startswith(noLogPrefix)) or \ not logChannelMessages: text = '-= THIS MESSAGE NOT LOGGED =-' - nick = msg.nick or irc.nick if ircmsgs.isAction(msg): self.doLog(irc, channel, '* %s %s\n', nick, ircmsgs.unAction(msg)) @@ -280,6 +284,8 @@ def outFilter(self, irc, msg): if msg.command in ('PRIVMSG', 'NOTICE'): # Other messages should be sent back to us. m = ircmsgs.IrcMsg(msg=msg, prefix=irc.prefix) + if msg.tagged('relayedMsg'): + m.tag('ChannelLogger__relayed') self(irc, m) return msg