diff --git a/messages/en.json b/messages/en.json index cfc2fd0..7aac8b3 100644 --- a/messages/en.json +++ b/messages/en.json @@ -108,6 +108,8 @@ "wolf_win": "Game over! There are the same number of wolves as uninjured villagers. The wolves overpower the villagers and win.", "new_game": "\u0002{0}\u0002 has started a game of Werewolf. Type \"{1}join\" to join. Type \"{1}start\" to vote to start the game. Type \"{1}wait\" to increase the start wait time.", "stasis": "Sorry, but {0} in stasis for {1} game{2}.", + "your_current_stasis": "You are currently in stasis for \u0002{0}\u0002 game{1}.", + "you_not_in_stasis": "You are not currently in stasis.", "not_playing": "\u0002{0}\u0002 is not currently playing.", "invalid_mode": "\u0002{0}\u0002 is not a valid mode. Valid modes are: {1}", "simple_off": "You now no longer receive simple role instructions.", diff --git a/src/wolfgame.py b/src/wolfgame.py index 171b0b2..fa87f57 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -7868,6 +7868,20 @@ def on_error(cli, pfx, msg): elif msg.startswith("Closing Link:"): raise SystemExit +@cmd("stasis", chan=True, pm=True) +def stasis(cli, nick, chan, rest): + st = is_user_stasised(nick) + + if st: + msg = messages["your_current_stasis"].format(st, "" if st == 1 else "s") + else: + msg = messages["you_not_in_stasis"] + + if chan == nick: + pm(cli, nick, msg) + else: + cli.msg(chan, "{0}: {1}".format(nick, msg)) + @cmd("fstasis", admin_only=True, pm=True) def fstasis(cli, nick, chan, rest): """Removes or sets stasis penalties."""