public static new ChatMessage decode(ref Lidgren.Network.NetIncomingMessage msg) { ChatMessage cm = new ChatMessage (Packet.decode (ref msg).ClientId); cm.Pseudo = msg.ReadString (); cm.Message = msg.ReadString (); return cm; }
private void sendMessage() { ChatMessage cm = new ChatMessage(client.ClientId); cm.Pseudo = client.Pseudo; cm.Message = toWrite; client.SendPacket(cm, true); toWrite = ""; }