From 15ee8873a9635ebcbb02df4cb12e8714a36985f4 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 4 Dec 2011 22:21:47 +0100 Subject: Sort nick/channel lists before sending reply --- miniircd | 5 +++-- 1 file 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, -- cgit v1.2.3