mirror of
https://github.com/ncoevoet/ChanTracker.git
synced 2025-05-01 16:01:06 -05:00
added feature : ask op about mode changes, per channel setting
This commit is contained in:
parent
4645b552fb
commit
7ea47f81dd
@ -78,6 +78,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
|
||||
|
||||
# flood detection settings
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user