mirror of
https://github.com/ncoevoet/ChanTracker.git
synced 2025-04-26 04:51:07 -05:00
add ability to set channel forward ban on cycle detected
This commit is contained in:
parent
aaa874be23
commit
d04636c322
@ -283,6 +283,8 @@ conf.registerChannelValue(ChanTracker, 'cycleDuration',
|
||||
registry.PositiveInteger(1800,"""punishment duration in seconds"""))
|
||||
conf.registerChannelValue(ChanTracker, 'cycleComment',
|
||||
registry.String('cycle detected',"""comment added on mode changes database, empty for no comment"""))
|
||||
conf.registerChannelValue(ChanTracker, 'cycleForward',
|
||||
registry.String('',"""if your ircd supports that, you can forward the user to a specific channel"""))
|
||||
|
||||
# channel massJoin from an host
|
||||
conf.registerChannelValue(ChanTracker, 'massJoinPermit',
|
||||
|
@ -2109,6 +2109,9 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
||||
mode = self.registryValue('%sMode' % kind,channel=channel)
|
||||
duration = self.registryValue('%sDuration' % kind,channel=channel)
|
||||
comment = self.registryValue('%sComment' % kind,channel=channel)
|
||||
forward = self.registryValue('cycleForward',channel=channel)
|
||||
if kind == 'cycle' and len(forward):
|
||||
best = best + '$' + forward
|
||||
self._act(irc,channel,mode,best,duration,comment)
|
||||
self.forceTickle = True
|
||||
if canRemove:
|
||||
@ -2254,6 +2257,9 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
||||
mode = self.registryValue('%sMode' % kind,channel=channel)
|
||||
duration = self.registryValue('%sDuration' % kind,channel=channel)
|
||||
comment = self.registryValue('%sComment' % kind,channel=channel)
|
||||
forward = self.registryValue('cycleForward',channel=channel)
|
||||
if kind == 'cycle' and len(forward):
|
||||
best = best + '$' + forward
|
||||
self._act(irc,channel,mode,best,duration,comment)
|
||||
self.forceTickle = True
|
||||
if removeNick:
|
||||
|
Loading…
x
Reference in New Issue
Block a user