public bool WatchGame(GamePlayer player) { if (spectators.ContainsKey(player.Name)) { if (spectators[player.Name].Tunnel.SendMessage("alreadyin")) { Logger.Log(LogType.Error, player.Name + " tried to join a game that he is already in"); return(false); } else { Logger.Log(LogType.Error, player.Name + " is rejoining a game he never properly quit from"); spectators.Remove(player.Name); } } player.Tunnel.SendMessage(player.Name); player.Tunnel.SendMessage(name); spectators.Add(player.Name, player); SendAllPlayerInfo(player); player.SetBank(player.Bank); return(true); }
public bool WatchGame(GamePlayer player) { if (spectators.ContainsKey(player.Name)) { if (spectators[player.Name].Tunnel.SendMessage("alreadyin")) { Logger.Log(LogType.Error, player.Name + " tried to join a game that he is already in"); return false; } else { Logger.Log(LogType.Error, player.Name + " is rejoining a game he never properly quit from"); spectators.Remove(player.Name); } } player.Tunnel.SendMessage(player.Name); player.Tunnel.SendMessage(name); spectators.Add(player.Name, player); SendAllPlayerInfo(player); player.SetBank(player.Bank); return true; }