Add !stasis command to view amount of stasis you have without joining

This commit is contained in:
nyuszika7h 2016-04-19 10:33:30 +02:00
parent a65b371111
commit 44ca368724
2 changed files with 16 additions and 0 deletions

View File

@ -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.",

View File

@ -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."""