mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Merge pull request #1248 from nirik/abuse-owner-to-trusted
change abuse command flood to except trusted users instead of just owners
This commit is contained in:
commit
b16ec65cb2
@ -105,7 +105,7 @@ class Misc(callbacks.Plugin):
|
||||
self.invalidCommands.enqueue(msg)
|
||||
if self.invalidCommands.len(msg) > maximum and \
|
||||
conf.supybot.abuse.flood.command.invalid() and \
|
||||
not ircdb.checkCapability(msg.prefix, 'owner'):
|
||||
not ircdb.checkCapability(msg.prefix, 'trusted'):
|
||||
punishment = conf.supybot.abuse.flood.command.invalid.punishment()
|
||||
banmask = '*!%s@%s' % (msg.user, msg.host)
|
||||
self.log.info('Ignoring %s for %s seconds due to an apparent '
|
||||
@ -133,7 +133,7 @@ class Misc(callbacks.Plugin):
|
||||
maximum = conf.supybot.abuse.flood.command.invalid.maximum()
|
||||
banmasker = conf.supybot.protocols.irc.banmask.makeBanmask
|
||||
if self.invalidCommands.len(msg) > maximum and \
|
||||
not ircdb.checkCapability(msg.prefix, 'owner') and \
|
||||
not ircdb.checkCapability(msg.prefix, 'trusted') and \
|
||||
msg.prefix != irc.prefix and \
|
||||
ircutils.isUserHostmask(msg.prefix):
|
||||
penalty = conf.supybot.abuse.flood.command.invalid.punishment()
|
||||
|
Loading…
Reference in New Issue
Block a user