no error ,everything work only i can''t send message if the message have banned words ,send button not work
[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.comThe 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 -
Can you share your global Antispam system please
Thanks -
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
- <?php
- $blocklist = array(//add strings to block in this array you can use full url or just parts of it
- 'eogame.eu',
- 'ogamex.eu',
- 'ogamex',
- 'eogame'
- );
- function array_search_partial($arr, $keyword) {
- foreach($arr as $index => $string) {
- if (strpos(strtolower($string), $keyword) !== FALSE)
- return $index;
- }
- }
- foreach($blocklist as $spam){
- if(array_search_partial($_POST, $spam) != '' || array_search_partial($_GET, $spam) != '')
- die('Spam');
- }
then insert following into game.php and index.php and chat/index.php after <?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.
VERY SAD
-
Share
- Facebook 0
- Twitter 0
- Google Plus 0
- Reddit 0
-
Users Online 1
1 Guest