diff --git a/plugins/ChannelLogger/config.py b/plugins/ChannelLogger/config.py index b7a1ce46c..40e6d3f2f 100644 --- a/plugins/ChannelLogger/config.py +++ b/plugins/ChannelLogger/config.py @@ -72,6 +72,10 @@ conf.registerChannelValue(ChannelLogger, 'filenameTimestamp', for the timestamp are in the time.strftime docs at python.org. In order for your logs to be rotated, you'll also have to enable supybot.plugins.ChannelLogger.rotateLogs."""))) +conf.registerChannelValue(ChannelLogger, 'rewriteRelayed', + registry.Boolean(False, _("""Determines whether the bot will rewrite + outgoing relayed messages (eg. from the Relay plugin) to use the original + nick instead of the bot's nick."""))) conf.registerGlobalValue(ChannelLogger, 'directories', registry.Boolean(True, _("""Determines whether the bot will partition its diff --git a/plugins/ChannelLogger/plugin.py b/plugins/ChannelLogger/plugin.py index 247e1baff..e9534bcaf 100644 --- a/plugins/ChannelLogger/plugin.py +++ b/plugins/ChannelLogger/plugin.py @@ -186,7 +186,9 @@ class ChannelLogger(callbacks.Plugin): except KeyError: logChannelMessages = True nick = msg.nick or irc.nick - if msg.tagged('ChannelLogger__relayed'): + rewriteRelayed = self.registryValue('rewriteRelayed', + channel, irc.network) + if rewriteRelayed and msg.tagged('ChannelLogger__relayed'): (nick, text) = text.split(' ', 1) nick = nick[1:-1] msg.args = (recipients, text)