private static void LeafUserUpdated(Leaf leaf, TCPPacketReader packet) { if (leaf.LoginPhase != LinkLogin.Ready) { leaf.SendPacket(HubOutbound.LinkError(LinkError.BadProtocol)); leaf.Disconnect(); return; } String name = packet.ReadString(leaf); LinkUser user = leaf.Users.Find(x => x.Name == name); if (user != null) { user.Level = (iconnect.ILevel)((byte)packet); user.Muzzled = ((byte)packet) == 1; user.Registered = ((byte)packet) == 1; user.Idle = ((byte)packet) == 1; LeafPool.Leaves.ForEachWhere(x => x.SendPacket(HubOutbound.HubUserUpdated(x, leaf.Ident, user)), x => x.Ident != leaf.Ident && x.LoginPhase == LinkLogin.Ready); } }