AttackProtector: Add supybot.plugins.AttackProtector.*.kickmessage.
parent
2d827d3bc9
commit
1ef8c6ba2a
|
@ -111,5 +111,9 @@ for kind, data in kinds.items():
|
|||
conf.registerChannelValue(getattr(AttackProtector, kind), 'punishment',
|
||||
Punishment(punishment, _("""Determines the punishment applied when
|
||||
%s.""") % help_))
|
||||
conf.registerChannelValue(getattr(AttackProtector, kind), 'kickmessage',
|
||||
registry.String('', _("""The kick message used
|
||||
when a user abuses the channel with this kind of flood. If empty,
|
||||
defaults to supybot.plugins.AttackProtector.kickmessage.""")))
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
|
||||
|
|
|
@ -188,7 +188,9 @@ class AttackProtector(callbacks.Plugin):
|
|||
except KeyError:
|
||||
pass
|
||||
punishment = self.registryValue('%s.punishment' % kind, channel)
|
||||
reason = self.registryValue('kickmessage').replace('$kind', kind)
|
||||
reason = self.registryValue('%s.kickmessage' % kind, channel)
|
||||
if not reason:
|
||||
reason = self.registryValue('kickmessage').replace('$kind', kind)
|
||||
|
||||
if punishment == 'kick':
|
||||
self._eventCatcher(irc, msg, 'kicked', kicked_prefix=prefix)
|
||||
|
|
Loading…
Reference in New Issue