diff --git a/config.py b/config.py index da15336..dbfcb2b 100644 --- a/config.py +++ b/config.py @@ -77,6 +77,9 @@ conf.registerChannelValue(ChanTracker, 'kickMode', conf.registerChannelValue(ChanTracker, 'kickMessage', registry.String("You are banned from this channel", """bot kick reason""")) + +conf.registerChannelValue(ChanTracker, 'askOpAboutMode', + registry.Boolean(False,"Ask the op who added a mode changes in pm about duration and comment""")) # related to channle's protection diff --git a/plugin.py b/plugin.py index 24eb9ad..47fcd1b 100644 --- a/plugin.py +++ b/plugin.py @@ -2084,6 +2084,8 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler): m = mode[1:] if m in self.registryValue('modesToAskWhenOpped') or m in self.registryValue('modesToAsk'): item = chan.addItem(m,value,msg.prefix,now,self.getDb(irc.network)) + if msg.nick != irc.nick and self.registryValue('askOpAboutMode',channel=channel) and ircdb.checkCapability(msg.prefix, '%s,op' % channel): + irc.queueMsg(ircmsgs.privmsg(msg.nick,'Could you edit or mark [#%s +%s %s in %s] ?' % (item.uid,m,value,channel))) if overexpire > 0: # overwrite expires if msg.nick != irc.nick: