"die": quit,
"google": c.googleq,
"units": c.unitq,
+ "help": c.helpq,
# "define": c.defineq,
# "game": (c.gameq,game),
"say": c.sayq,
# disconnect and hop annoy people
# "disconnect": c.disconnq,
# "hop": c.disconnq }
-commands["list"]=(c.listkeysq,commands)
+commands["list"]=(c.listkeysq,commands,True)
triggers = ("!", "~") # what character should the bot be invoked by:
# eg !trout, ~trout etc.
bot.disconnect(msg="Be right back.")
### list keys of a dictionary
-def listkeysq(bot, cmd, nick, conn, public, dict):
- bot.automsg(public,nick,string.join(dict.keys()))
+def listkeysq(bot, cmd, nick, conn, public, dict, sort=False):
+ d=dict.keys()
+ if sort:
+ d.sort()
+ bot.automsg(public,nick,string.join(d))
### rot13 text (yes, I could have typed out the letters....)
### also "foo".encode('rot13') would have worked