added new setting that allows to not announce modes made by ignored user

This commit is contained in:
Nicolas Coevoet 2014-07-18 18:45:14 +02:00
parent 872550c353
commit 95f8d1cb75
2 changed files with 6 additions and 2 deletions

View File

@ -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"""))

View File

@ -2784,6 +2784,7 @@ 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):
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):