コード例 #1
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session == null || Session.GetHabbo() == null)
            {
                return;
            }

            _ = Packet.PopInt();
            string Pin = Packet.PopString();

            if (Pin == Session.GetHabbo().PinClient)
            {
                NeonEnvironment.GetGame().GetClientManager().ManagerAlert(RoomNotificationComposer.SendBubble("estaff", "El usuario " + Session.GetHabbo().Username + " se ha autentificado correctamente", ""));
                Session.SendMessage(new CheckGnomeNameComposer(Pin, 0));
                Session.SendMessage(new GraphicAlertComposer("staff"));
                Session.GetHabbo().StaffOk = true;
                if (Session.GetHabbo().GetPermissions().HasRight("mod_tickets"))
                {
                    Session.SendMessage(new ModeratorInitComposer(
                                            NeonEnvironment.GetGame().GetModerationManager().UserMessagePresets,
                                            NeonEnvironment.GetGame().GetModerationManager().RoomMessagePresets,
                                            NeonEnvironment.GetGame().GetModerationManager().GetTickets));
                }
            }
            else
            {
                Session.SendMessage(new CheckGnomeNameComposer(Pin, 0));
                Session.SendMessage(new RoomCustomizedAlertComposer("AVISO: el pin es incorrecto se avisárá a todo el equipo Staff."));
                NeonEnvironment.GetGame().GetClientManager().ManagerAlert(new MOTDNotificationComposer("ATENCION: El Staff " + Session.GetHabbo().Username + " ha fallado al autentificar su identidad."));
                Session.GetConnection().Dispose();
                LogCommand(Session.GetHabbo().Id, "Inicio de sesión inválido", Session.GetHabbo().MachineId, Session.GetHabbo().Username);
            }
        }