public override void Handle(NetPeer peer, DataReader dataReader)
        {
            ChatSendPacket    chatSendPacket    = new ChatSendPacket(dataReader);
            ChatReceivePacket chatReceivePacket = new ChatReceivePacket(chatSendPacket.message);

            serverInteractor.networkInteractor.BroadcastBut(peer.Id, chatReceivePacket.ToPacket(), DeliveryMethod.ReliableOrdered);
        }
Esempio n. 2
0
        private void HandleChatReceivePacket(ChatReceivePacket packet)
        {
            if (!Authorized)
            {
                SendPacket(new AuthorizationDisconnectPacket {
                    Reason = "Not authorized!"
                });
                return;
            }

            ChatEnabled = packet.Enabled;
        }