From 7fea01a51494097e7acdacec3e5038765f6d7b1b Mon Sep 17 00:00:00 2001 From: jcao219 Date: Sat, 30 Jul 2011 11:18:44 -0500 Subject: [PATCH] sort the ping lists alphabetically (for MJ94) --- wolfgame.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wolfgame.py b/wolfgame.py index 7dc88da..e0a8872 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -264,6 +264,8 @@ def pinger(cli, nick, chan, rest): def do_ping(*args): if not var.PINGING: return + TO_PING.sort(key=lambda x: x.lower()) + cli.msg(chan, "PING! "+" ".join(TO_PING)) var.PINGING = False @@ -2012,10 +2014,10 @@ def show_admins(cli, nick, chan, rest): user != botconfig.NICK): admins.append(user) - - @hook("endofwho", id = 4) def show(*args): + admins.sort(key=lambda x: x.lower()) + cli.msg(chan, "Available admins: "+" ".join(admins)) decorators.unhook(HOOKS, 4)