mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-19 08:59:27 +01:00
ChannelLogger: Make relayed message rewriting optional.
This commit is contained in:
parent
75f7479bf4
commit
08f4c781cb
@ -72,6 +72,10 @@ conf.registerChannelValue(ChannelLogger, 'filenameTimestamp',
|
|||||||
for the timestamp are in the time.strftime docs at python.org. In order
|
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
|
for your logs to be rotated, you'll also have to enable
|
||||||
supybot.plugins.ChannelLogger.rotateLogs.""")))
|
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',
|
conf.registerGlobalValue(ChannelLogger, 'directories',
|
||||||
registry.Boolean(True, _("""Determines whether the bot will partition its
|
registry.Boolean(True, _("""Determines whether the bot will partition its
|
||||||
|
@ -186,7 +186,9 @@ class ChannelLogger(callbacks.Plugin):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
logChannelMessages = True
|
logChannelMessages = True
|
||||||
nick = msg.nick or irc.nick
|
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, text) = text.split(' ', 1)
|
||||||
nick = nick[1:-1]
|
nick = nick[1:-1]
|
||||||
msg.args = (recipients, text)
|
msg.args = (recipients, text)
|
||||||
|
Loading…
Reference in New Issue
Block a user