mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 12:12:53 +01:00
relay: skip iterating over modetype definitions during reverse mode lookup
This fixes a bug when setting +l on UnrealIRCd, where the type C mode definition is coincidentally also equal to 'l'. Reported by kevin via IRC.
This commit is contained in:
parent
ffa89f1e01
commit
838ea6bfc4
@ -578,6 +578,10 @@ def getSupportedUmodes(irc, remoteirc, modes):
|
|||||||
|
|
||||||
# Iterate over all supported user modes for the current network.
|
# Iterate over all supported user modes for the current network.
|
||||||
for name, m in irc.umodes.items():
|
for name, m in irc.umodes.items():
|
||||||
|
if name.startswith('*'):
|
||||||
|
# XXX: Okay, we need a better place to store modetypes.
|
||||||
|
continue
|
||||||
|
|
||||||
supported_char = None
|
supported_char = None
|
||||||
|
|
||||||
# Mode character matches one in our list, so set that named mode
|
# Mode character matches one in our list, so set that named mode
|
||||||
@ -740,7 +744,12 @@ def getSupportedCmodes(irc, remoteirc, channel, modes):
|
|||||||
# this mode, and what its mode char for it is (if it is different).
|
# this mode, and what its mode char for it is (if it is different).
|
||||||
for name, m in irc.cmodes.items():
|
for name, m in irc.cmodes.items():
|
||||||
supported_char = None
|
supported_char = None
|
||||||
|
if name.startswith('*'):
|
||||||
|
# XXX: Okay, we need a better place to store modetypes.
|
||||||
|
continue
|
||||||
|
|
||||||
if modechar == m:
|
if modechar == m:
|
||||||
|
|
||||||
supported_char = remoteirc.cmodes.get(name)
|
supported_char = remoteirc.cmodes.get(name)
|
||||||
|
|
||||||
if supported_char is None:
|
if supported_char is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user