From d386b76d48d4668eacedc6504630a9a9dda3351d Mon Sep 17 00:00:00 2001 From: skizzerz Date: Sat, 14 Nov 2015 23:08:51 -0600 Subject: [PATCH] Don't allow spectating deadchat if one is already in it --- messages/en.json | 1 + src/wolfgame.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/messages/en.json b/messages/en.json index 9db6b17..2f0a1df 100644 --- a/messages/en.json +++ b/messages/en.json @@ -749,6 +749,7 @@ "fspectate_help": "Usage: fspectate [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}." } diff --git a/src/wolfgame.py b/src/wolfgame.py index 66a4fcb..136329c 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -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: