mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
BadWords: truly fix kicks when badwords list is empty (#989)
This commit is contained in:
parent
3047ea7acb
commit
96dc860313
@ -71,12 +71,12 @@ class BadWords(callbacks.Privmsg):
|
|||||||
self.filtering = True
|
self.filtering = True
|
||||||
# We need to check for bad words here rather than in doPrivmsg because
|
# We need to check for bad words here rather than in doPrivmsg because
|
||||||
# messages don't get to doPrivmsg if the user is ignored.
|
# messages don't get to doPrivmsg if the user is ignored.
|
||||||
if msg.command == 'PRIVMSG':
|
if msg.command == 'PRIVMSG' and self.words():
|
||||||
channel = msg.args[0]
|
channel = msg.args[0]
|
||||||
self.updateRegexp(channel)
|
self.updateRegexp(channel)
|
||||||
s = ircutils.stripFormatting(msg.args[1])
|
s = ircutils.stripFormatting(msg.args[1])
|
||||||
if ircutils.isChannel(channel) and self.registryValue('kick', channel):
|
if ircutils.isChannel(channel) and self.registryValue('kick', channel):
|
||||||
if self.words and self.regexp.search(s):
|
if self.regexp.search(s):
|
||||||
c = irc.state.channels[channel]
|
c = irc.state.channels[channel]
|
||||||
cap = ircdb.makeChannelCapability(channel, 'op')
|
cap = ircdb.makeChannelCapability(channel, 'op')
|
||||||
if c.isHalfopPlus(irc.nick):
|
if c.isHalfopPlus(irc.nick):
|
||||||
|
Loading…
Reference in New Issue
Block a user