From 24d7c1ed5a58ceaa3def19c08ce0bbf333a8c33f Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Tue, 19 May 2015 10:43:25 +0200 Subject: [PATCH] Add the ability to "disable" certain game modes Players can't vote for disabled game modes, but they can still be forced with !fgame. --- botconfig.py.example | 3 +++ src/wolfgame.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/botconfig.py.example b/botconfig.py.example index ace580e..b587964 100644 --- a/botconfig.py.example +++ b/botconfig.py.example @@ -24,6 +24,9 @@ ADMINS = ("unaffiliated/wolfbot_admin2", "unaffiliated/wolfbot_admin3") # glob OWNERS_ACCOUNTS = ("1owner_acc",) ADMINS_ACCOUNTS = ("1admin_acc", "2admin_acc") +# Players can't vote for these game modes, but they can still be forced with !fgame. +DISABLED_GAMEMODES = [] + ALT_CHANNELS = "" ALLOWED_ALT_CHANNELS_COMMANDS = [] diff --git a/src/wolfgame.py b/src/wolfgame.py index b3566e9..399d27e 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -7236,7 +7236,7 @@ def game(cli, nick, chan, rest): return gamemode = match - if gamemode != "roles": + if gamemode != "roles" and gamemode not in botconfig.DISABLED_GAMEMODES: var.GAMEMODE_VOTES[nick] = gamemode cli.msg(chan, "\002{0}\002 votes for the \002{1}\002 game mode.".format(nick, gamemode)) else: