mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 12:12:53 +01:00
utils.applyModes: fix prefixmodes lists not being updated...
This commit is contained in:
parent
bad1132789
commit
e2738e3909
@ -99,7 +99,9 @@ def getPrefixModes(irc, remoteirc, channel, user):
|
|||||||
for pmode in ('owner', 'admin', 'op', 'halfop', 'voice'):
|
for pmode in ('owner', 'admin', 'op', 'halfop', 'voice'):
|
||||||
if pmode not in remoteirc.cmodes: # Mode not supported by IRCd
|
if pmode not in remoteirc.cmodes: # Mode not supported by IRCd
|
||||||
continue
|
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]
|
modes += remoteirc.cmodes[pmode]
|
||||||
return modes
|
return modes
|
||||||
|
|
||||||
|
1
utils.py
1
utils.py
@ -233,6 +233,7 @@ def applyModes(irc, target, changedmodes):
|
|||||||
pmodelist.add(mode[1])
|
pmodelist.add(mode[1])
|
||||||
else:
|
else:
|
||||||
pmodelist.discard(mode[1])
|
pmodelist.discard(mode[1])
|
||||||
|
irc.channels[target].prefixmodes[pmode] = pmodelist
|
||||||
log.debug('(%s) Final prefixmodes list: %s', irc.name, irc.channels[target].prefixmodes)
|
log.debug('(%s) Final prefixmodes list: %s', irc.name, irc.channels[target].prefixmodes)
|
||||||
if real_mode[0] in irc.prefixmodes:
|
if real_mode[0] in irc.prefixmodes:
|
||||||
# Ignore other prefix modes such as InspIRCd's +Yy
|
# Ignore other prefix modes such as InspIRCd's +Yy
|
||||||
|
Loading…
Reference in New Issue
Block a user