public void ChatReq(string text) { var player = State.Instance.GetPlayer(_sender); if (player.IsSpectator && _gameSettings.MuteSpectators) { player.Rpc.Error("You cannot chat, the host has muted spectators."); return; } _broadcaster.Chat(player.Id, text); }
public void ChatReq(string text) { var player = State.Instance.GetPlayer(_sender); if (player.IsSpectator && _gameSettings.MuteSpectators) { player.Rpc.Error(L.D.ServerMessage__SpectatorsMuted); return; } _broadcaster.Chat(player.Id, text); if (State.Instance.Engine.IsLocal != false) { return; } var mess = new GameMessage(); // don't send if we join our own room...that'd be annoying //if (player.Nick.Equals(State.Instance.Engine.Game.HostUserName, StringComparison.InvariantCultureIgnoreCase)) return; mess.Message = string.Format("{0} has left your game", player.Nick); mess.Sent = DateTime.Now; mess.SessionId = State.Instance.Engine.Game.Id; mess.Type = GameMessageType.Chat; //new Octgn.Site.Api.ApiClient().GameMessage(State.Instance.Engine.ApiKey, mess); }
public void ChatReq(string text) { _broadcaster.Chat(_clients[_sender].Id, text); }
public void ChatReq(string text) { _broadcaster.Chat(State.Instance.GetPlayer(_sender).Id, text); }