Fix logic in doMode wrt conditional kicking of users.

This commit is contained in:
Krytarik Raido 2022-04-02 04:27:04 +02:00
parent 2c94abb49a
commit e552313951

View File

@ -4380,7 +4380,7 @@ class ChanTracker(callbacks.Plugin, plugins.ChannelDBHandler):
chan.action.enqueue(ircmsgs.kick(channel, nick, km)) chan.action.enqueue(ircmsgs.kick(channel, nick, km))
self.forceTickle = True self.forceTickle = True
kicked = True kicked = True
elif m == 'b' and not (kicked or chan.attacked): if m == 'b' and not (kicked or chan.attacked):
if msg.nick in (irc.nick, 'ChanServ'): if msg.nick in (irc.nick, 'ChanServ'):
bm = self.registryValue('banMessage', channel=channel, network=irc.network) bm = self.registryValue('banMessage', channel=channel, network=irc.network)
if len(bm): if len(bm):
@ -4400,7 +4400,7 @@ class ChanTracker(callbacks.Plugin, plugins.ChannelDBHandler):
i.lowQueue.enqueue(ircmsgs.notice(nick, bm)) i.lowQueue.enqueue(ircmsgs.notice(nick, bm))
else: else:
i.lowQueue.enqueue(ircmsgs.privmsg(nick, bm)) i.lowQueue.enqueue(ircmsgs.privmsg(nick, bm))
elif m == 'q' and not (kicked or chan.attacked or value == '$~a'): if m == 'q' and not (kicked or chan.attacked or value == '$~a'):
if msg.nick in (irc.nick, 'ChanServ'): if msg.nick in (irc.nick, 'ChanServ'):
qm = self.registryValue('quietMessage', channel=channel, network=irc.network) qm = self.registryValue('quietMessage', channel=channel, network=irc.network)
if len(qm): if len(qm):