diff --git a/config.py b/config.py index 9d17235..799fe46 100644 --- a/config.py +++ b/config.py @@ -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', diff --git a/plugin.py b/plugin.py index dda570b..0f46ddb 100644 --- a/plugin.py +++ b/plugin.py @@ -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: