Chat() public method

public Chat ( byte player, string text ) : void
player byte
text string
return void
Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public void ChatReq(string text)
 {
     _broadcaster.Chat(_clients[_sender].Id, text);
 }
Ejemplo n.º 4
0
 public void ChatReq(string text)
 {
     _broadcaster.Chat(State.Instance.GetPlayer(_sender).Id, text);
 }