mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
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:
parent
5dc72d2b34
commit
91d2a2860f
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user