ChannelLogger: Fix regression preventing outgoing messages from being logged.

Since eb1e27e20b, IrcCallback.__call__ filters out
privmsgs and notices sent by the bot itself unless echoMessage=True is set.
This commit is contained in:
Valentin Lorentz 2020-08-23 16:30:46 +02:00
parent 5dc72d2b34
commit 91d2a2860f

View File

@ -59,6 +59,8 @@ class FakeLog(object):
class ChannelLogger(callbacks.Plugin): class ChannelLogger(callbacks.Plugin):
"""This plugin allows the bot to log channel conversations to disk.""" """This plugin allows the bot to log channel conversations to disk."""
noIgnore = True noIgnore = True
echoMessage = True
def __init__(self, irc): def __init__(self, irc):
self.__parent = super(ChannelLogger, self) self.__parent = super(ChannelLogger, self)
self.__parent.__init__(irc) self.__parent.__init__(irc)
@ -283,10 +285,8 @@ class ChannelLogger(callbacks.Plugin):
# Let's try this little trick... # Let's try this little trick...
if msg.command in ('PRIVMSG', 'NOTICE'): if msg.command in ('PRIVMSG', 'NOTICE'):
# Other messages should be sent back to us. # Other messages should be sent back to us.
m = ircmsgs.IrcMsg(msg=msg, prefix=irc.prefix)
if msg.tagged('relayedMsg'): if msg.tagged('relayedMsg'):
m.tag('ChannelLogger__relayed') msg.tag('ChannelLogger__relayed')
self(irc, m)
return msg return msg