mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-12 13:12:36 +01:00
utils.applyModes: don't crash if existing modelist is a list, not a set
This commit is contained in:
parent
bf444f3f6a
commit
8cde2ddce7
2
utils.py
2
utils.py
@ -216,7 +216,7 @@ def applyModes(irc, target, changedmodes):
|
|||||||
else:
|
else:
|
||||||
old_modelist = irc.channels[target].modes
|
old_modelist = irc.channels[target].modes
|
||||||
supported_modes = irc.cmodes
|
supported_modes = irc.cmodes
|
||||||
modelist = old_modelist.copy()
|
modelist = set(old_modelist)
|
||||||
log.debug('(%s) Applying modes %r on %s (initial modelist: %s)', irc.name, changedmodes, target, modelist)
|
log.debug('(%s) Applying modes %r on %s (initial modelist: %s)', irc.name, changedmodes, target, modelist)
|
||||||
for mode in changedmodes:
|
for mode in changedmodes:
|
||||||
# Chop off the +/- part that parseModes gives; it's meaningless for a mode list.
|
# Chop off the +/- part that parseModes gives; it's meaningless for a mode list.
|
||||||
|
Loading…
Reference in New Issue
Block a user