Chat() 공개 메소드

public Chat ( byte player, string text ) : void
player byte
text string
리턴 void
예제 #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);
        }
예제 #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);
        }
예제 #3
0
파일: Handler.cs 프로젝트: totalgit/OCTGN
 public void ChatReq(string text)
 {
     _broadcaster.Chat(_clients[_sender].Id, text);
 }
예제 #4
0
파일: Handler.cs 프로젝트: karlnp/OCTGN
 public void ChatReq(string text)
 {
     _broadcaster.Chat(State.Instance.GetPlayer(_sender).Id, text);
 }