From eb032eb7f96dbab4546bad563089eb53f863a148 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 31 Jul 2016 21:46:33 -0700 Subject: [PATCH] commands: explicitly sort mode lists in 'showuser' and 'showchan' --- plugins/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/commands.py b/plugins/commands.py index 0701c9a..2885c41 100644 --- a/plugins/commands.py +++ b/plugins/commands.py @@ -51,7 +51,7 @@ def showuser(irc, source, args): if verbose: # Oper only data: user modes, channels on, account info, etc. - f('\x02User modes\x02: %s' % irc.joinModes(userobj.modes)) + f('\x02User modes\x02: %s' % irc.joinModes(userobj.modes, sort=True)) f('\x02Protocol UID\x02: %s; \x02Real host\x02: %s; \x02IP\x02: %s' % \ (u, userobj.realhost, userobj.ip)) channels = sorted(userobj.channels) @@ -91,7 +91,7 @@ def showchan(irc, source, args): f('\x02Channel topic\x02: %s' % c.topic) f('\x02Channel creation time\x02: %s (%s)' % (ctime(c.ts), c.ts)) # Show only modes that aren't list-style modes. - modes = irc.joinModes([m for m in c.modes if m[0] not in irc.cmodes['*A']]) + modes = irc.joinModes([m for m in c.modes if m[0] not in irc.cmodes['*A']], sort=True) f('\x02Channel modes\x02: %s' % modes) if verbose: nicklist = []