From 5294f92c6cccb3a98852884ef4304cd8e8757bd2 Mon Sep 17 00:00:00 2001 From: "Vgr E. Barry" Date: Thu, 3 Sep 2015 12:00:40 -0400 Subject: [PATCH] Add !games to show the available game modes --- src/wolfgame.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/wolfgame.py b/src/wolfgame.py index 6e34f99..f45dc6a 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -8122,6 +8122,17 @@ def game(cli, nick, chan, rest): else: cli.notice(nick, "You can't vote for that game mode.") +@cmd("games", "modes", pm=True) +def show_modes(cli, nick, chan, rest): + """Show the available game modes.""" + msg = "Available game modes: \u0002" + modes = "\u0002, \u0002".join(sorted(var.GAME_MODES.keys() - {"roles"})) + + if chan == nick: + pm(cli, nick, msg + modes + "\u0002") + else: + cli.notice(nick, msg + modes + "\u0002") + def game_help(args=""): return "Votes to make a specific game mode more likely. Available game mode setters: " +\ ", ".join("\u0002{0}\u0002".format(gamemode) if len(var.list_players()) in range(var.GAME_MODES[gamemode][1], var.GAME_MODES[gamemode][2]+1)