summaryrefslogtreecommitdiff
path: root/miniircd
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2011-12-04 22:21:47 +0100
committerJoel Rosdahl <joel@rosdahl.net>2011-12-04 22:21:47 +0100
commit15ee8873a9635ebcbb02df4cb12e8714a36985f4 (patch)
treeed7e096952558d3bd87ce8b46f50d4e893a33033 /miniircd
parent68962fb3ddddd9e52c157f104892017683abd350 (diff)
downloadminiircd-15ee8873a9635ebcbb02df4cb12e8714a36985f4.tar.gz
miniircd-15ee8873a9635ebcbb02df4cb12e8714a36985f4.zip
Sort nick/channel lists before sending reply
Diffstat (limited to 'miniircd')
-rwxr-xr-xminiircd5
1 files changed, 3 insertions, 2 deletions
diff --git a/miniircd b/miniircd
index 9e7a280..c579bf1 100755
--- a/miniircd
+++ b/miniircd
@@ -221,8 +221,8 @@ class Client(object):
self.reply("353 %s = %s :%s"
% (self.nickname,
channelname,
- " ".join([x.nickname
- for x in channel.members])))
+ " ".join(sorted(x.nickname
+ for x in channel.members))))
self.reply("366 %s %s :End of NAMES list"
% (self.nickname, channelname))
@@ -235,6 +235,7 @@ class Client(object):
channel = server.get_channel(channelname)
if channel:
channels.append(channel)
+ channels.sort(key=lambda x: x.name)
for channel in channels:
self.reply("322 %s %s %d :%s"
% (self.nickname, channel.name,