Don't allow spectating deadchat if one is already in it

This commit is contained in:
skizzerz 2015-11-14 23:08:51 -06:00
parent 80e5c72b3d
commit d386b76d48
2 changed files with 4 additions and 0 deletions

View File

@ -749,6 +749,7 @@
"fspectate_help": "Usage: fspectate <wolfchat|deadchat> [on|off]",
"fspectate_restricted": "You may not spectate while playing.",
"fspectate_deadchat_disabled": "Deadchat is disabled and may not be spectated.",
"fspectate_in_deadchat": "You are currently in deadchat.",
"fspectate_on": "You are now spectating {0}.",
"fspectate_off": "You are no longer spectating {0}."
}

View File

@ -8877,6 +8877,9 @@ def fspectate(cli, nick, chan, rest):
var.SPECTATING_WOLFCHAT.add(nick)
players = (p for p in var.list_players() if in_wolflist(p, p))
elif var.ENABLE_DEADCHAT:
if nick in var.DEADCHAT_PLAYERS:
pm(cli, nick, messages["fspectate_in_deadchat"])
return
var.SPECTATING_DEADCHAT.add(nick)
players = var.DEADCHAT_PLAYERS
else: