Esempio n. 1
0
        private static void LeafPublicText(Leaf leaf, TCPPacketReader packet)
        {
            if (leaf.LoginPhase != LinkLogin.Ready)
            {
                leaf.SendPacket(HubOutbound.LinkError(LinkError.BadProtocol));
                leaf.Disconnect();
                return;
            }

            String name = packet.ReadString(leaf);
            String text = packet.ReadString(leaf);

            LeafPool.Leaves.ForEachWhere(x => x.SendPacket(HubOutbound.HubPublicText(x, leaf.Ident, name, text)),
                                         x => x.Ident != leaf.Ident && x.LoginPhase == LinkLogin.Ready);
        }