3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 09:19:23 +01:00

inspircd: fix logic for tracking existing bans in sjoin()

This commit is contained in:
James Lu 2016-06-23 22:33:14 -07:00
parent 6555ba2e6a
commit 77e13bce03

View File

@ -111,8 +111,10 @@ class InspIRCdProtocol(TS6BaseProtocol):
regularmodes = []
for mode in modes:
modechar = mode[0][-1]
# Don't reset bans that have already been set
if modechar in self.irc.cmodes['*A'] and (modechar, mode[1]) not in self.irc.channels[channel].modes:
if modechar in self.irc.cmodes['*A']:
# Track bans separately (they are sent as a normal FMODE instead of in FJOIN.
# However, don't reset bans that have already been set.
if (modechar, mode[1]) not in self.irc.channels[channel].modes:
banmodes.append(mode)
else:
regularmodes.append(mode)