diff --git a/plugins/Misc/plugin.py b/plugins/Misc/plugin.py index 5680589fb..c67068069 100644 --- a/plugins/Misc/plugin.py +++ b/plugins/Misc/plugin.py @@ -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] diff --git a/src/conf.py b/src/conf.py index 2340cb2d8..a82b91fd9 100644 --- a/src/conf.py +++ b/src/conf.py @@ -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.""")) ###