mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +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,10 +75,11 @@ class Misc(callbacks.Plugin):
|
||||
'observed. Consider ignoring this bot '
|
||||
'permanently.')
|
||||
ircdb.ignores.add(banmask, time.time() + punishment)
|
||||
irc.reply('You\'ve given me %s invalid commands within the last '
|
||||
'minute; I\'m now ignoring you for %s.' %
|
||||
(maximum,
|
||||
utils.timeElapsed(punishment, seconds=False)))
|
||||
if conf.supybot.abuse.flood.command.invalid.notify():
|
||||
irc.reply('You\'ve given me %s invalid commands within the last '
|
||||
'minute; I\'m now ignoring you for %s.' %
|
||||
(maximum,
|
||||
utils.timeElapsed(punishment, seconds=False)))
|
||||
return
|
||||
# Now, for normal handling.
|
||||
channel = msg.args[0]
|
||||
|
@ -651,6 +651,9 @@ registerGlobalValue(supybot.abuse.flood.command.invalid, 'punishment',
|
||||
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
|
||||
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