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

            int userId = Packet.PopInt();

            if (userId == 0 || userId == Session.GetHabbo().Id)
            {
                return;
            }

            string message = Packet.PopString();

            if (string.IsNullOrWhiteSpace(message))
            {
                return;
            }
            if (Session.GetHabbo().TimeMuted > 0)
            {
                Session.SendWhisper("Opa, você foi silenciado por 15 segundos, você não pode enviar mensagens durante este período.");
                return;
            }

            string word;

            if (!Session.GetHabbo().GetPermissions().HasRight("word_filter_override") &&
                CloudServer.GetGame().GetChatManager().GetFilter().IsUnnaceptableWord(message, out word))
            {
                Session.GetHabbo().BannedPhraseCount++;
                if (Session.GetHabbo().BannedPhraseCount >= 1)
                {
                    Session.GetHabbo().TimeMuted = 25;
                    Session.SendNotification("Você foi silênciado, aparentemente divulgo um hotel! aviso: " + Session.GetHabbo().BannedPhraseCount + "/3");
                    CloudServer.GetGame().GetClientManager().StaffAlert(new RoomNotificationComposer("Alerta de divulgadores!",
                                                                                                     "Atenção você mencionaou a palavra <b>" + word.ToUpper() + "</b><br><br><b>Frase:</b><br><i>" + message +
                                                                                                     "</i>.<br><br><b>Tipo</b><br>Spam em chat.\r\n" + "- Este usuario: <b>" +
                                                                                                     Session.GetHabbo().Username + "</b>", NotificationSettings.NOTIFICATION_FILTER_IMG, "", ""));
                }
                if (Session.GetHabbo().BannedPhraseCount >= 5)
                {
                    CloudServer.GetGame().GetModerationManager().BanUser("Protocolo", HabboHotel.Moderation.ModerationBanType.USERNAME, Session.GetHabbo().Username, "Banido por fazer spam com frases (" + message + ")", (CloudServer.GetUnixTimestamp() + 78892200));
                    Session.Disconnect();
                    return;
                }
                return;
            }

            Session.GetHabbo().GetMessenger().SendInstantMessage(userId, message);
        }
示例#2
0
 public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
 {
     Session.Disconnect();
 }
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session == null || Session.GetHabbo() == null || Session.GetHabbo().GetMessenger() == null)
            {
                return;
            }

            int userId = Packet.PopInt();

            if (userId == 0 || userId == Session.GetHabbo().Id)
            {
                return;
            }

            string message = Packet.PopString();

            if (string.IsNullOrWhiteSpace(message))
            {
                return;
            }
            if (Session.GetHabbo().TimeMuted > 0)
            {
                Session.SendWhisper("Opa, você foi silenciado por 15 segundos, você não pode enviar mensagens durante este período.");
                return;
            }

            string word;

            if (!Session.GetHabbo().GetPermissions().HasRight("word_filter_override") &&
                BiosEmuThiago.GetGame().GetChatManager().GetFilter().IsUnnaceptableWord(message, out word))
            {
                Session.GetHabbo().BannedPhraseCount++;
                if (Session.GetHabbo().BannedPhraseCount >= 1)
                {
                    Session.GetHabbo().TimeMuted = 25;
                    Session.SendNotification("Você foi silênciado, aparentemente divulgo um hotel! aviso: " + Session.GetHabbo().BannedPhraseCount + "/3");
                    BiosEmuThiago.GetGame().GetClientManager().StaffAlert(new RoomNotificationComposer("Alerta de divulgadores!",
                                                                                                       "Atenção você mencionaou a palavra <b>" + word.ToUpper() + "</b><br><br><b>Frase:</b><br><i>" + message +
                                                                                                       "</i>.<br><br><b>Tipo</b><br>Spam em chat.\r\n" + "- Este usuario: <b>" +
                                                                                                       Session.GetHabbo().Username + "</b>", NotificationSettings.NOTIFICATION_FILTER_IMG, "", ""));
                }
                if (Session.GetHabbo().BannedPhraseCount >= 5)
                {
                    BiosEmuThiago.GetGame().GetModerationManager().BanUser("Protocolo", HabboHotel.Moderation.ModerationBanType.USERNAME, Session.GetHabbo().Username, "Banido por fazer spam com frases (" + message + ")", (BiosEmuThiago.GetUnixTimestamp() + 78892200));
                    Session.Disconnect();
                    return;
                }
                return;
            }

            if (Session.GetHabbo().Rank > 0)
            {
                DataRow presothiago = null;
                using (var dbClient = BiosEmuThiago.GetDatabaseManager().GetQueryReactor())
                {
                    dbClient.SetQuery("SELECT Presidio FROM users WHERE id = '" + Session.GetHabbo().Id + "'");
                    presothiago = dbClient.getRow();
                }

                if (Convert.ToBoolean(presothiago["Presidio"]) == true)
                {
                    if (Session.GetHabbo().Rank > 0)
                    {
                        string thiago = Session.GetHabbo().Look;
                        Session.SendMessage(new RoomNotificationComposer("police_announcement", "message", "Você esta preso e não pode enviar mensagens."));
                        return;
                    }
                }
            }

            Session.GetHabbo().GetMessenger().SendInstantMessage(userId, message);
        }
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session.GetHabbo().TimeMuted > 0)
            {
                Session.SendNotification("Oops, estas muteado - No puedes enviar invitaciones a salas");
                return;
            }

            int Amount = Packet.PopInt();

            if (Amount > 500)
            {
                return; // don't send at all
            }
            List <int> Targets = new List <int>();

            for (int i = 0; i < Amount; i++)
            {
                int uid = Packet.PopInt();
                if (i < 100) // limit to 100 people, keep looping until we fulfil the request though
                {
                    Targets.Add(uid);
                }
            }

            string Message = StringCharFilter.Escape(Packet.PopString());

            if (Message.Length > 121)
            {
                Message = Message.Substring(0, 121);
            }

            if (Message.Contains("&#1º;") || Message.Contains("&#1º") || Message.Contains("&#"))
            {
                Session.SendMessage(new MassEventComposer("habbopages/spammer.txt")); return;
            }

            string word;

            if (!Session.GetHabbo().GetPermissions().HasRight("word_filter_override") &&
                RavenEnvironment.GetGame().GetChatManager().GetFilter().IsUnnaceptableWord(Message, out word))
            {
                Session.GetHabbo().BannedPhraseCount++;
                if (Session.GetHabbo().BannedPhraseCount >= 1)
                {
                    Session.GetHabbo().TimeMuted = 25;
                    Session.SendNotification("¡Has sido silenciad@ mientras un moderador revisa tu caso, al parecer nombraste un hotel! Aviso " + Session.GetHabbo().BannedPhraseCount + "/3");
                    RavenEnvironment.GetGame().GetClientManager().StaffAlert1(new RoomInviteComposer(int.MinValue, "Spammer: " + Session.GetHabbo().Username + " / Frase: " + Message + " / Palabra: " + word.ToUpper() + " / Fase: " + Session.GetHabbo().BannedPhraseCount + " / 10."));
                    RavenEnvironment.GetGame().GetClientManager().StaffAlert2(new RoomNotificationComposer("Alerta de publicista:",
                                                                                                           "<b><font color=\"#B40404\">Por favor, recuerda investigar bien antes de recurrir a una sanción.</font></b><br><br>Palabra: <b>" + word.ToUpper() + "</b>.<br><br><b>Frase:</b><br><i>" + Message +
                                                                                                           "</i>.<br><br><b>Tipo:</b><br>Chat de sala.\r\n" + "<b>Usuario: " + Session.GetHabbo().Username + "</b><br><b>Secuencia:</b> " + Session.GetHabbo().BannedPhraseCount + "/ 10.", "foto", "Investigar", "event:navigator/goto/" +
                                                                                                           Session.GetHabbo().CurrentRoomId));
                    return;
                }
                if (Session.GetHabbo().BannedPhraseCount >= 10)
                {
                    RavenEnvironment.GetGame().GetModerationManager().BanUser("System", HabboHotel.Moderation.ModerationBanType.USERNAME, Session.GetHabbo().Username, "Baneado por hacer Spam con la Frase (" + Message + ")", (RavenEnvironment.GetUnixTimestamp() + 78892200));
                    Session.Disconnect();
                    return;
                }
                return;
            }

            foreach (int UserId in Targets)
            {
                if (!Session.GetHabbo().GetMessenger().FriendshipExists(UserId))
                {
                    continue;
                }

                GameClient Client = RavenEnvironment.GetGame().GetClientManager().GetClientByUserID(UserId);
                if (Client == null || Client.GetHabbo() == null || Client.GetHabbo().AllowMessengerInvites == true || Client.GetHabbo().AllowConsoleMessages == false)
                {
                    continue;
                }

                Client.SendMessage(new RoomInviteComposer(Session.GetHabbo().Id, Message));
                Client.SendMessage(RoomNotificationComposer.SendBubble("eventoxx", "" + Session.GetHabbo().Username + " te invita a un nuevo evento en su sala. Su mensaje es " + Message + ".", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId));
            }

            using (IQueryAdapter dbClient = RavenEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.SetQuery("INSERT INTO `chatlogs_console_invitations` (`user_id`,`message`,`timestamp`) VALUES ('" + Session.GetHabbo().Id + "', @message, UNIX_TIMESTAMP())");
                dbClient.AddParameter("message", Message);
                dbClient.RunQuery();
            }
        }
示例#5
0
        public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
        {
            if (Session == null || Session.GetHabbo() == null || Session.GetHabbo().GetMessenger() == null)
            {
                return;
            }

            int userId = Packet.PopInt();

            if (userId == 0 || userId == Session.GetHabbo().Id)
            {
                return;
            }

            string message = Packet.PopString();

            if (string.IsNullOrWhiteSpace(message))
            {
                return;
            }

            if (Session.GetHabbo().TimeMuted > 0)
            {
                Session.SendWhisper("Oops, has sido silenciado durante 15 segundos, no podrás enviar mensajes durante este lapso de tiempo.", 34);
                return;
            }

            if (message.Contains("&#1º;") || message.Contains("&#1º") || message.Contains("&#"))
            {
                Session.SendMessage(new MassEventComposer("habbopages/spammer.txt")); return;
            }

            if (Session.GetHabbo().LastMessage == message)
            {
                Session.GetHabbo().LastMessageCount++;
                if (Session.GetHabbo().LastMessageCount > 3)
                {
                    NeonEnvironment.GetGame().GetClientManager().RepeatAlert(new RoomInviteComposer(int.MinValue, "Repeat: " + Session.GetHabbo().Username + " / Frase: " + message + " / Veces: " + Session.GetHabbo().LastMessageCount + "."));
                    Session.GetHabbo().LastMessageCount = 0;
                }
            }

            if (!Session.GetHabbo().GetPermissions().HasRight("word_filter_override") &&
                NeonEnvironment.GetGame().GetChatManager().GetFilter().IsUnnaceptableWord(message, out string word))
            {
                Session.GetHabbo().BannedPhraseCount++;
                if (Session.GetHabbo().BannedPhraseCount >= 1)
                {
                    Session.GetHabbo().TimeMuted = 15;
                    Session.SendNotification("Acabas de mencionar una palabra prohibida en el filtro de " + NeonEnvironment.GetDBConfig().DBData["hotel.name"] + ", tal vez pueda tratarse de un error. Asegúrate de no volver a repetirla, este sistema está hecho para evitar publicistas. Recuerda que se acaba de advertir a los miembros del equipo, si no se trata de un caso de publicidad no te asustes. Aviso " + Session.GetHabbo().BannedPhraseCount + " / 10");
                    NeonEnvironment.GetGame().GetClientManager().StaffAlert1(new RoomInviteComposer(int.MinValue, "Spammer: " + Session.GetHabbo().Username + " / Frase: " + message + " / Palabra: " + word.ToUpper() + " / Fase: " + Session.GetHabbo().BannedPhraseCount + " / 10."));
                    NeonEnvironment.GetGame().GetClientManager().StaffAlert2(new RoomNotificationComposer("Alerta de publicista:",
                                                                                                          "<b><font color=\"#B40404\">Por favor, recuerda investigar bien antes de recurrir a una sanción.</font></b><br><br>Palabra: <b>" + word.ToUpper() + "</b>.<br><br><b>Frase:</b><br><i>" + message +
                                                                                                          "</i>.<br><br><b>Tipo:</b><br>Chat de sala.\r\n" + "<b>Usuario: " + Session.GetHabbo().Username + "</b><br><b>Secuencia:</b> " + Session.GetHabbo().BannedPhraseCount + "/ 10.", "foto", "Investigar", "event:navigator/goto/" +
                                                                                                          Session.GetHabbo().CurrentRoomId));
                    return;
                }
                if (Session.GetHabbo().BannedPhraseCount >= 10)
                {
                    NeonEnvironment.GetGame().GetModerationManager().BanUser("Neon", HabboHotel.Moderation.ModerationBanType.USERNAME, Session.GetHabbo().Username, "Baneado por hacer spam con la Frase (" + message + ")", (NeonEnvironment.GetUnixTimestamp() + 78892200));
                    Session.Disconnect();
                    return;
                }
                return;
            }

            Session.GetHabbo().LastMessage = message;
            Session.GetHabbo().GetMessenger().SendInstantMessage(userId, message);
        }