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

utils.applyModes: fix prefixmodes lists not being updated...

This commit is contained in:
James Lu 2015-07-21 19:57:22 -07:00
parent bad1132789
commit e2738e3909
2 changed files with 4 additions and 1 deletions

View File

@ -99,7 +99,9 @@ def getPrefixModes(irc, remoteirc, channel, user):
for pmode in ('owner', 'admin', 'op', 'halfop', 'voice'):
if pmode not in remoteirc.cmodes: # Mode not supported by IRCd
continue
if user in irc.channels[channel].prefixmodes[pmode+'s']:
mlist = irc.channels[channel].prefixmodes[pmode+'s']
log.debug('(%s) getPrefixModes: checking if %r is in %r', irc.name, user, mlist)
if user in mlist:
modes += remoteirc.cmodes[pmode]
return modes

View File

@ -233,6 +233,7 @@ def applyModes(irc, target, changedmodes):
pmodelist.add(mode[1])
else:
pmodelist.discard(mode[1])
irc.channels[target].prefixmodes[pmode] = pmodelist
log.debug('(%s) Final prefixmodes list: %s', irc.name, irc.channels[target].prefixmodes)
if real_mode[0] in irc.prefixmodes:
# Ignore other prefix modes such as InspIRCd's +Yy