From 91d2a2860f315ff4cad1c735676d4812279c4817 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 23 Aug 2020 16:30:46 +0200 Subject: [PATCH] ChannelLogger: Fix regression preventing outgoing messages from being logged. Since eb1e27e20b206ca29cfc4d3a8bacbaf126980ebc, IrcCallback.__call__ filters out privmsgs and notices sent by the bot itself unless echoMessage=True is set. --- plugins/ChannelLogger/plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/ChannelLogger/plugin.py b/plugins/ChannelLogger/plugin.py index e9534bcaf..2f47b7cd0 100644 --- a/plugins/ChannelLogger/plugin.py +++ b/plugins/ChannelLogger/plugin.py @@ -59,6 +59,8 @@ class FakeLog(object): class ChannelLogger(callbacks.Plugin): """This plugin allows the bot to log channel conversations to disk.""" noIgnore = True + echoMessage = True + def __init__(self, irc): self.__parent = super(ChannelLogger, self) self.__parent.__init__(irc) @@ -283,10 +285,8 @@ class ChannelLogger(callbacks.Plugin): # Let's try this little trick... 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) + msg.tag('ChannelLogger__relayed') return msg