[MOD] Antispam

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • i see,
      the antispamscript catches the massage at the beginning,
      so the messange can not be send,
      cause the script dies(die('spam');) after finding a match,
      this happens before the message processed by the engine.
      this is how i intended it to work.
    • решение отличное! --- ОДНО НО - mimikri у вас ajax загрузка данных в вашем случае это будет отлично но другим я его не рекомендую
      если нет подгрузки ajax то данное решение очень будет тормозить игру запросами и проверками .. если игроков много и все они пишут.. это можно использовать только на ajax проектах .. или дописать проверку данную именно с ajax запросом и выводом то есть малось поправить ваш мод и сделать дл янего вывод и запросы через базу данных ajax
      Делаю качественно в сроки! на любой версии moons, встрою, или напишу любой мод , но дорого! afire-space.com

      The post was edited 1 time, last by Shadow ().

    • I made once a global Antispam system that i offereed to the 2moons community, i aint sure if Mimikri will one day release it or not but if he isnt then i will release the latest version i made that i did send to him.

      The antispam is common to all games (one database for all spam words) but you can select to only block spam from dictionary words added by you alone of from all the games using the system
    • mimikri wrote:

      hi guys, yesterday my game has been spammed by Thranduil .

      so i decided to make a little mod for us, wich blocks spammers.
      the tool simply searches all POST and GET inputs from the user for predefined substrings.

      to protect your game make a file called "antispam.php" in basedirectory of your game

      PHP Source Code: antispam.php

      1. <?php
      2. $blocklist = array(//add strings to block in this array you can use full url or just parts of it
      3. 'eogame.eu',
      4. 'ogamex.eu',
      5. 'ogamex',
      6. 'eogame'
      7. );
      8. function array_search_partial($arr, $keyword) {
      9. foreach($arr as $index => $string) {
      10. if (strpos(strtolower($string), $keyword) !== FALSE)
      11. return $index;
      12. }
      13. }
      14. foreach($blocklist as $spam){
      15. if(array_search_partial($_POST, $spam) != '' || array_search_partial($_GET, $spam) != '')
      16. die('Spam');
      17. }
      Display All

      then insert following into game.php and index.php and chat/index.php after <?php

      PHP Source Code

      1. include 'antispam.php';
      thats it, this protects from all inputs you added to the blocklist. you can also use parts of the url.
      don't use this mod, it is uncompleat and will cause errors, new mod will be published soon
      hope you enjoy. :D
      es posible integrarlo a los mensajes de los jugadores también?
      VERY SAD :/ :/ :/ :/