Exemple #1
0
        public void SendNameColourPacket()
        {
            if (IsBot || GetClient() == null || GetClient().GetHabbo() == null)
            {
                return;
            }

            if (GetClient().GetHabbo().ChatPreference)
            {
                return;
            }

            string Username;

            if (GetClient().GetHabbo()._NamePrefix == "off" || GetClient().GetHabbo()._NamePrefix == "")
            {
                Username = "******" + GetClient().GetHabbo().chatHTMLColour + "'>" + GetClient().GetHabbo().Username + "</font>";

                if (GetRoom() != null)
                {
                    GetRoom().SendMessage(new UserNameChangeComposer(RoomId, VirtualId, Username));
                }
            }
            else
            {
                if (GetClient().GetHabbo()._NamePrefixColor == "rainbow")
                {
                    Username = "******" + CloudServer.RainbowT() + "'>[" + GetClient().GetHabbo()._NamePrefix + "]</font> <font color='" + GetClient().GetHabbo().chatHTMLColour + "'>" + GetClient().GetHabbo().Username + "</font>";
                }
                else
                {
                    Username = "******" + GetClient().GetHabbo()._NamePrefixColor + "'>[" + GetClient().GetHabbo()._NamePrefix + "]</font> <font color='" + GetClient().GetHabbo().chatHTMLColour + "'>" + GetClient().GetHabbo().Username + "</font>";
                }

                if (GetRoom() != null)
                {
                    GetRoom().SendMessage(new UserNameChangeComposer(RoomId, VirtualId, Username));
                }
            }
        }