From a8303d01102ba234ab667fad0df01cfb80e2c31b Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 14 Mar 2016 14:35:09 -0700 Subject: [PATCH] commands: sort channel list in 'showuser' output --- plugins/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/commands.py b/plugins/commands.py index fe17504..ec402ba 100644 --- a/plugins/commands.py +++ b/plugins/commands.py @@ -106,12 +106,12 @@ def showuser(irc, source, args): f('\x02User modes\x02: %s' % utils.joinModes(userobj.modes)) f('\x02Protocol UID\x02: %s; \x02Real host\x02: %s; \x02IP\x02: %s' % \ (u, userobj.realhost, userobj.ip)) - f('\x02Channels\x02: %s' % (' '.join(userobj.channels).strip() or _none)) + channels = sorted(userobj.channels) + f('\x02Channels\x02: %s' % (' '.join(channels) or _none)) f('\x02PyLink identification\x02: %s; \x02Services account\x02: %s; \x02Away status\x02: %s' % \ ((userobj.identified or _none), (userobj.services_account or _none), userobj.away or _none)) - @utils.add_cmd def showchan(irc, source, args): """