mirror of
https://github.com/ncoevoet/ChanTracker.git
synced 2025-05-06 11:33:40 -05:00
added debug mode 'd' for *Mode in protections
This commit is contained in:
parent
b0d9330df9
commit
498edec5e9
@ -155,6 +155,7 @@ Each of those detections has the same kind of settings: there is *Permit (-1 to
|
|||||||
- b : ban the user
|
- b : ban the user
|
||||||
- k : kick the user
|
- k : kick the user
|
||||||
- r : remove (force part) the user, if the ircd has the feature. 'REMOVE $channel $nick :$reason'
|
- r : remove (force part) the user, if the ircd has the feature. 'REMOVE $channel $nick :$reason'
|
||||||
|
- d : debug > forward action to logChannel if configured
|
||||||
|
|
||||||
For bans (b and q mode), you can choose the *Duration of the quiet/ban, and add a *Mark on the related quiet/ban. The 'bad' settings, when enabled (badPermit > -1) keeps track of users who did something wrong during badLife, and can end to badMode if the user exceeds the limit.
|
For bans (b and q mode), you can choose the *Duration of the quiet/ban, and add a *Mark on the related quiet/ban. The 'bad' settings, when enabled (badPermit > -1) keeps track of users who did something wrong during badLife, and can end to badMode if the user exceeds the limit.
|
||||||
|
|
||||||
|
@ -2821,6 +2821,10 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
# protection features
|
# protection features
|
||||||
|
|
||||||
def _act (self,irc,channel,mode,mask,duration,reason):
|
def _act (self,irc,channel,mode,mask,duration,reason):
|
||||||
|
if mode == 'd':
|
||||||
|
if self.registryValue('logChannel',channel=channel) in irc.state.channels:
|
||||||
|
self._logChan(irc,channel,'[%s] debug %s %s %s %s' % (channel,mode,mask,duration,reason)
|
||||||
|
return
|
||||||
if mode in self.registryValue('modesToAsk',channel=channel) or mode in self.registryValue('modesToAskWhenOpped',channel=channel):
|
if mode in self.registryValue('modesToAsk',channel=channel) or mode in self.registryValue('modesToAskWhenOpped',channel=channel):
|
||||||
i = self.getIrc(irc)
|
i = self.getIrc(irc)
|
||||||
if i.add(irc,channel,mode,mask,duration,irc.prefix,self.getDb(irc.network)):
|
if i.add(irc,channel,mode,mask,duration,irc.prefix,self.getDb(irc.network)):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user