[UBEREMU] Wordfilter 90%

Page 2 of 2 FirstFirst 12
Results 26 to 35 of 35
  1. #26
    Apprentice John6813 is offline
    MemberRank
    Jun 2010 Join Date
    21Posts

    Re: [UBEREMU] Wordfilter 90%

    How could I change the word "bobba" to another word?

  2. #27
    Member SkyHacker is offline
    MemberRank
    Feb 2007 Join Date
    79Posts

    Re: [UBEREMU] Wordfilter 90%

    yes is work witsh spazz emu or Blah's Emulator?

  3. #28
    Otaku Sojobo is offline
    MemberRank
    Nov 2006 Join Date
    ScotlandLocation
    1,279Posts

    Re: [UBEREMU] Wordfilter 90%

    Your attempt at a filter runs a MySQL query every single time someone talks, enjoy your MySQL rape.

    If you want to do it properly then load the filtered words on bootup and cache them, then check against the cache rather than running a MySQL query each time cos on a big hotel this will seriously rape CPU for MySQL.

  4. #29
    Member SkyHacker is offline
    MemberRank
    Feb 2007 Join Date
    79Posts

    Re: [UBEREMU] Wordfilter 90%

    or you make mysql Cache higher :P

  5. #30
    Otaku Sojobo is offline
    MemberRank
    Nov 2006 Join Date
    ScotlandLocation
    1,279Posts

    Re: [UBEREMU] Wordfilter 90%

    Quote Originally Posted by SkyHacker View Post
    or you make mysql Cache higher :P
    Why bother using MySQL at all, 1 query on bootup is better than 100 queries/ second no matter how you look at it.

  6. #31
    GreenMaX keven007 is offline
    MemberRank
    Jul 2008 Join Date
    The NetherlandsLocation
    275Posts

    Re: [UBEREMU] Wordfilter 90%

    Still good but, on KM there is a better Bobba Filer that you can configure in config like on and replace word etc. Word you can do in config. I will release it soon here.

  7. #32
    Member SkyHacker is offline
    MemberRank
    Feb 2007 Join Date
    79Posts

    Re: [UBEREMU] Wordfilter 90%

    i have the code on off is easy ^^

  8. #33
    Alpha Member Moogly is offline
    MemberRank
    Feb 2008 Join Date
    Pool LidoLocation
    2,322Posts

    Re: [UBEREMU] Wordfilter 90%

    if you wana cache them make a 'dictionary' (C#) and do 2 fields (MySQL DB) 'to_filter' and 'filter_with' then for filter_with the default could be 'bobba' so it auto uses bobba when someone adds a word, then just load all the words into the 'dictionary' at start up, ta-da cached filter.

    Quote Originally Posted by Sojobo View Post
    Why bother using MySQL at all, 1 query on bootup is better than 100 queries/ second no matter how you look at it.
    The only time Aaron's ever said anything intelligent? -gasp- but wait caching has been done for ages now everyone knows this.
    Last edited by Moogly; 14-01-11 at 02:23 PM.

  9. #34
    Banned Beny. is offline
    BannedRank
    Aug 2009 Join Date
    536Posts

    Re: [UBEREMU] Wordfilter 90%

    Even more advanced:
    Code:
                    DataTable Data2 = null;
    
                    using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
                    {
                        Data2 = dbClient.ReadDataTable("SELECT SQL_NO_CACHE * FROM wordfilter");
                    }
    
                    if (Data2 != null)
                    {
                        foreach (DataRow Row2 in Data2.Rows)
                        {
                            string Lowered = Message.ToLower();
                            Lowered = Lowered.Replace(" ", "");
                            Lowered = Lowered.Replace("´", "");
                            Lowered = Lowered.Replace("`", "");
                            Lowered = Lowered.Replace("^", "");
                            Lowered = Lowered.Replace("*", "");
                            Lowered = Lowered.Replace("'", "");
                            Lowered = Lowered.Replace("-", "");
                            if (Lowered.Contains(Row2["word"].ToString()))
                            {
    
                                Message = "**** The Super Hotel spam filter has blocked this text! ****";
                                GetClient().SendNotif("You have swore or have been classified as a spammer. \nYou have now been muted for 30 seconds!");
                                ServerMessage Packet = new ServerMessage(27);
                                Packet.AppendInt32(30); //Blocked for 1 Minute
                                GetClient().SendMessage(Packet);
    
                            }
                            //}
                        }
    Now this will check for FuCK or Fuck or FuCK or F-U-CK or F*ck or F-ck or F uck or F'ck
    And will also mute them for 30 seconds!
    Last edited by Beny.; 02-04-11 at 09:38 PM.

  10. #35
    Account Upgraded | Title Enabled! FlyCoder is offline
    MemberRank
    Jan 2011 Join Date
    United KingdomLocation
    469Posts

    Re: [UBEREMU] Wordfilter 90%

    nom nom nom nom nom nom nom, nub don't bump.



Page 2 of 2 FirstFirst 12

Advertisement