Make commands that only work while playing fail silently if the person isn't playing
This commit is contained in:
parent
3f5e3fce78
commit
f96d73a8af
@ -306,7 +306,6 @@
|
|||||||
"ill_wolves": "You are feeling ill tonight, and are unable to kill anyone.",
|
"ill_wolves": "You are feeling ill tonight, and are unable to kill anyone.",
|
||||||
"angry_wolves": "You are \u0002angry\u0002 tonight, and may kill two targets by using \"kill <nick1> and <nick2>\".",
|
"angry_wolves": "You are \u0002angry\u0002 tonight, and may kill two targets by using \"kill <nick1> and <nick2>\".",
|
||||||
"wolf_bite": "You may use \"bite <nick>\" tonight in order to turn that person into a wolf.",
|
"wolf_bite": "You may use \"bite <nick>\" tonight in order to turn that person into a wolf.",
|
||||||
"player_not_playing": "You're not currently playing.",
|
|
||||||
"werecrow_transformed": "You have already transformed into a crow, and cannot turn back until day.",
|
"werecrow_transformed": "You have already transformed into a crow, and cannot turn back until day.",
|
||||||
"retracted_kill": "You have retracted your kill.",
|
"retracted_kill": "You have retracted your kill.",
|
||||||
"wolfchat_retracted_kill": "\u0002{0}\u0002 has retracted their kill.",
|
"wolfchat_retracted_kill": "\u0002{0}\u0002 has retracted their kill.",
|
||||||
|
@ -143,10 +143,6 @@ class cmd:
|
|||||||
return
|
return
|
||||||
|
|
||||||
if self.playing and (nick not in list_players() or nick in var.DISCONNECTED):
|
if self.playing and (nick not in list_players() or nick in var.DISCONNECTED):
|
||||||
if chan == nick:
|
|
||||||
pm(cli, nick, messages["player_not_playing"])
|
|
||||||
else:
|
|
||||||
cli.notice(nick, messages["player_not_playing"])
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.roles:
|
if self.roles:
|
||||||
|
@ -5135,7 +5135,6 @@ def retract(cli, nick, chan, rest):
|
|||||||
if chan not in (botconfig.CHANNEL, nick):
|
if chan not in (botconfig.CHANNEL, nick):
|
||||||
return
|
return
|
||||||
if (nick not in var.VENGEFUL_GHOSTS.keys() and nick not in list_players()) or nick in var.DISCONNECTED.keys():
|
if (nick not in var.VENGEFUL_GHOSTS.keys() and nick not in list_players()) or nick in var.DISCONNECTED.keys():
|
||||||
cli.notice(nick, messages["player_not_playing"])
|
|
||||||
return
|
return
|
||||||
|
|
||||||
with var.GRAVEYARD_LOCK, var.WARNING_LOCK:
|
with var.GRAVEYARD_LOCK, var.WARNING_LOCK:
|
||||||
@ -5287,7 +5286,6 @@ def is_safe(nick, victim): # helper function
|
|||||||
def kill(cli, nick, chan, rest):
|
def kill(cli, nick, chan, rest):
|
||||||
"""Kill a player. Behaviour varies depending on your role."""
|
"""Kill a player. Behaviour varies depending on your role."""
|
||||||
if (nick not in var.VENGEFUL_GHOSTS.keys() and nick not in list_players()) or nick in var.DISCONNECTED.keys():
|
if (nick not in var.VENGEFUL_GHOSTS.keys() and nick not in list_players()) or nick in var.DISCONNECTED.keys():
|
||||||
reply(cli, nick, chan, messages["player_not_playing"], private=True)
|
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
role = get_role(nick)
|
role = get_role(nick)
|
||||||
@ -6933,7 +6931,6 @@ def start(cli, nick, chan, forced = False, restart = ""):
|
|||||||
cli.notice(nick, messages["werewolf_already_running"])
|
cli.notice(nick, messages["werewolf_already_running"])
|
||||||
return
|
return
|
||||||
if nick not in villagers and nick != chan and not forced:
|
if nick not in villagers and nick != chan and not forced:
|
||||||
cli.notice(nick, messages["player_not_playing"])
|
|
||||||
return
|
return
|
||||||
|
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
@ -7863,7 +7860,6 @@ def myrole(cli, nick, chan, rest):
|
|||||||
|
|
||||||
ps = list_players()
|
ps = list_players()
|
||||||
if nick not in ps:
|
if nick not in ps:
|
||||||
cli.notice(nick, messages["player_not_playing"])
|
|
||||||
return
|
return
|
||||||
|
|
||||||
role = get_role(nick)
|
role = get_role(nick)
|
||||||
@ -8423,7 +8419,6 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
|
|||||||
pl = list_players()
|
pl = list_players()
|
||||||
|
|
||||||
if nick not in pl and not is_admin(nick):
|
if nick not in pl and not is_admin(nick):
|
||||||
cli.notice(nick, messages["player_not_playing"])
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if rest:
|
if rest:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user