AttackProtector: Add supybot.plugins.AttackProtector.kickmessage.
parent
cc966b2fe8
commit
2d827d3bc9
|
@ -83,6 +83,10 @@ conf.registerChannelValue(AttackProtector, 'enable',
|
|||
conf.registerGlobalValue(AttackProtector, 'exempt',
|
||||
registry.String('nopunish', _("""If a user has this capability, he won't be
|
||||
punished by AttackProtector""")))
|
||||
conf.registerGlobalValue(AttackProtector, 'kickmessage',
|
||||
registry.String(_('$kind flood detected'), _("""The kick message used
|
||||
when a user abuses the channel. $kind will be replaced with the kind
|
||||
of attack.""")))
|
||||
conf.registerGlobalValue(AttackProtector, 'delay',
|
||||
registry.Integer(10, _("""Determines how long (in seconds) the plugin will
|
||||
wait before being enabled. A too low value makes the bot believe that
|
||||
|
|
|
@ -188,7 +188,7 @@ class AttackProtector(callbacks.Plugin):
|
|||
except KeyError:
|
||||
pass
|
||||
punishment = self.registryValue('%s.punishment' % kind, channel)
|
||||
reason = _('%s flood detected') % kind
|
||||
reason = self.registryValue('kickmessage').replace('$kind', kind)
|
||||
|
||||
if punishment == 'kick':
|
||||
self._eventCatcher(irc, msg, 'kicked', kicked_prefix=prefix)
|
||||
|
|
Loading…
Reference in New Issue