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

utils.applyModes: don't crash if existing modelist is a list, not a set

This commit is contained in:
James Lu 2015-07-19 22:42:04 -07:00
parent bf444f3f6a
commit 8cde2ddce7

View File

@ -216,7 +216,7 @@ def applyModes(irc, target, changedmodes):
else:
old_modelist = irc.channels[target].modes
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)
for mode in changedmodes:
# Chop off the +/- part that parseModes gives; it's meaningless for a mode list.