mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-22 10:04:25 +01:00
Misc: Fix ignoring of user flooding with invalid commands in private.
This commit is contained in:
parent
390af5d049
commit
d8df5cc650
@ -121,7 +121,7 @@ class Misc(callbacks.Plugin):
|
||||
if self.invalidCommands.len(msg) > maximum and \
|
||||
not ircdb.checkCapability(msg.prefix, 'owner'):
|
||||
penalty = conf.supybot.abuse.flood.command.invalid.punishment()
|
||||
banmask = banmasker(msg.prefix)
|
||||
banmask = banmasker(msg.prefix, channel=None)
|
||||
self.log.info('Ignoring %s for %s seconds due to an apparent '
|
||||
'invalid command flood.', banmask, penalty)
|
||||
if tokens and tokens[0] == 'Error:':
|
||||
|
@ -1001,7 +1001,7 @@ class Banmask(registry.SpaceSeparatedSetOfStrings):
|
||||
self.error()
|
||||
self.__parent.setValue(self.List(v))
|
||||
|
||||
def makeBanmask(self, hostmask, options=None):
|
||||
def makeBanmask(self, hostmask, options=None, channel=None):
|
||||
"""Create a banmask from the given hostmask. If a style of banmask
|
||||
isn't specified via options, the value of
|
||||
conf.supybot.protocols.irc.banmask is used.
|
||||
@ -1009,7 +1009,8 @@ class Banmask(registry.SpaceSeparatedSetOfStrings):
|
||||
options - A list specifying which parts of the hostmask should
|
||||
explicitly be matched: nick, user, host. If 'exact' is given, then
|
||||
only the exact hostmask will be used."""
|
||||
channel = dynamic.channel
|
||||
if not channel:
|
||||
channel = dynamic.channel
|
||||
assert channel is None or ircutils.isChannel(channel)
|
||||
(nick, user, host) = ircutils.splitHostmask(hostmask)
|
||||
bnick = '*'
|
||||
|
Loading…
Reference in New Issue
Block a user