3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +01:00

Irc.joinModes(): sort mode list before formatting

This commit is contained in:
James Lu 2016-06-30 19:52:06 -07:00
parent 4cd49296e5
commit cc40cacb7a

View File

@ -749,6 +749,10 @@ class Irc():
prefix = '+' # Assume we're adding modes unless told otherwise
modelist = ''
args = []
# Sort modes alphabetically like a conventional IRCd.
modes = sorted(modes)
for modepair in modes:
mode, arg = modepair
assert len(mode) in (1, 2), "Incorrect length of a mode (received %r)" % mode