From 95f8d1cb75b918d133d4a1d1a08a907aed28a5de Mon Sep 17 00:00:00 2001 From: Nicolas Coevoet Date: Fri, 18 Jul 2014 18:45:14 +0200 Subject: [PATCH] added new setting that allows to not announce modes made by ignored user --- config.py | 3 +++ plugin.py | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index 361e9ac..e0de7c8 100644 --- a/config.py +++ b/config.py @@ -83,6 +83,9 @@ conf.registerChannelValue(ChanTracker, 'announceOthers', registry.Boolean(True,"""forward messages from quieted/banned users to logChannel; used when bot stays opped and channel is +z (reduced moderation). Messages from users flagged as bad, or when channel is under attack will not be forwarded""")) +conf.registerChannelValue(ChanTracker, 'announceModeMadeByIgnored', + registry.Boolean(True,"""announce channel modes made by ignored user""")) + conf.registerChannelValue(ChanTracker, 'announceWithNotice', registry.Boolean(False,"""use NOTICE instead of PRIVMSG to logChannel""")) diff --git a/plugin.py b/plugin.py index e3310fd..2aca33a 100644 --- a/plugin.py +++ b/plugin.py @@ -2784,8 +2784,9 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler): if irc.nick in irc.state.channels[channel].ops and not self.registryValue('keepOp',channel=channel): self.forceTickle = True if len(self.registryValue('announceModes',channel=channel)) and len(msgs): - self._logChan(irc,channel,'[%s] %s sets %s' % (channel,msg.nick,' '.join(msgs))) - self.forceTickle = True + if self.registryValue('announceModeMadeByIgnored',channel=channel) or not ircdb.checkIgnored(msg.prefix,channel): + self._logChan(irc,channel,'[%s] %s sets %s' % (channel,msg.nick,' '.join(msgs))) + self.forceTickle = True if len(toexpire): for item in toexpire: f = None