mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Added supybot.abuse.flood.command.invalid.notify, a configuration variable determining whether the bot will notify infractors of their ignoring.
This commit is contained in:
parent
416a6e8dd2
commit
b9d6277e30
@ -75,6 +75,7 @@ class Misc(callbacks.Plugin):
|
|||||||
'observed. Consider ignoring this bot '
|
'observed. Consider ignoring this bot '
|
||||||
'permanently.')
|
'permanently.')
|
||||||
ircdb.ignores.add(banmask, time.time() + punishment)
|
ircdb.ignores.add(banmask, time.time() + punishment)
|
||||||
|
if conf.supybot.abuse.flood.command.invalid.notify():
|
||||||
irc.reply('You\'ve given me %s invalid commands within the last '
|
irc.reply('You\'ve given me %s invalid commands within the last '
|
||||||
'minute; I\'m now ignoring you for %s.' %
|
'minute; I\'m now ignoring you for %s.' %
|
||||||
(maximum,
|
(maximum,
|
||||||
|
@ -651,6 +651,9 @@ registerGlobalValue(supybot.abuse.flood.command.invalid, 'punishment',
|
|||||||
value is higher than supybot.abuse.flood.command.punishment, since it's far
|
value is higher than supybot.abuse.flood.command.punishment, since it's far
|
||||||
less likely (and far more annoying) for users to flood witih invalid
|
less likely (and far more annoying) for users to flood witih invalid
|
||||||
commands than for them to flood with valid commands."""))
|
commands than for them to flood with valid commands."""))
|
||||||
|
registerGlobalValue(supybot.abuse.flood.command.invalid, 'notify',
|
||||||
|
registry.Boolean(True, """Determines whether the bot will notify people that they're
|
||||||
|
being ignored for invalid command flooding."""))
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
Loading…
Reference in New Issue
Block a user