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); }
private void HandleChatReceivePacket(ChatReceivePacket packet) { if (!Authorized) { SendPacket(new AuthorizationDisconnectPacket { Reason = "Not authorized!" }); return; } ChatEnabled = packet.Enabled; }