|
|
Модератор форума: Dimitro |
Форум TrinityCore Патчи / Моды / Фиксы для Trinity [patch] Антимат |
[patch] Антимат |
Выкладываю для Вас патч - Антимат.
Что может делать скрипт:
Code bool CheckMessage( Player* player, std::string& msg) { if( IgnoreGMFilterCheck && player->GetSession()->GetSecurity() >= SEC_MODERATOR ) return true; int val = Filter->check(msg); if( val ) { switch (val) { case 1: if( bFinePlayer ) { if( FinePlayer(player,mat_gold_amount) ) player->GetSession()->SendNotification("You lost %d gold. Swearing is not allowed",mat_gold_amount); else { PunishPlayer(player); player->GetSession()->SendNotification("Swearing is not allowed. You got punished because you have no money to pay the fine"); } } else { msg = ""; } sLog->outAntimat("[MAT] Player %s sends: %s",player->GetName(), msg.c_str()); break; case 2: if( bFinePlayer ) { if( FinePlayer(player,obmen_gold_amount) ) player->GetSession()->SendNotification("Character exchange is forbidden on this server. You lost %d gold",obmen_gold_amount); else { PunishPlayer(player); player->GetSession()->SendNotification("Character exchange is forbidden on this server. You got punished because you have no money to pay the fine"); } } player->GetSession()->m_muteTime = time(0) + 60; sLog->outAntimat("[OBMEN] Player %s sends: %s",player->GetName(), msg.c_str()); msg = ""; break; case 3: if( bFinePlayer ) { if( FinePlayer(player,jokes_gold_amount) ) player->GetSession()->SendNotification("Stupid jokes are forbidden on this server. You lost %d gold",jokes_gold_amount); else { PunishPlayer(player); player->GetSession()->SendNotification("Stupid jokes are forbidden on this server. You got punished becauseyou have no money to pay the fine"); } } player->GetSession()->m_muteTime = time(0) + 60; sLog->outAntimat("[TRASH] Player %s sends: %s",player->GetName(), msg.c_str()); msg = ""; break; case 4: if( bFinePlayer ) { if( FinePlayer(player,offence_gold_amount) ) player->GetSession()->SendNotification("Offence is not allowed on this server. You lost %d gold",offence_gold_amount); else { PunishPlayer(player); player->GetSession()->SendNotification("You got punished because you have no money to pay the fine"); } } player->GetSession()->m_muteTime = time(0) + 60; sLog->outAntimat("[OFFENCE] Player %s sends: %s",player->GetName(), msg.c_str()); msg = ""; break; } return false; } return true; } Настройка производится в worldserver.conf Вывод в antimat.log: Code 2011-08-27 15:35:34 [OBMEN] Player Test sends: обменяю паладина 6700 гс в пм 2011-08-27 15:36:35 [OFFENCE] Player Test sends: админ мудак 2011-08-27 15:37:46 [MAT] Player Test sends: mUdаК 2011-08-27 15:38:51 [OBMEN] Player Test sends: Obmenjau pа1adina в пм 2011-08-27 15:40:28 [MAT] Player Test sends: P1ZdеЦ Скачать патч в ядро можно тут Источник |
Патчк старый и насколько помню переписаный с мангоса,нужно кучу проверок дописывать иначе он будет выдавать мут даже не за матное слово,нужно создавать отдельную таблицу лексикона
Сообщение # 10 написано 13.05.2012 в 16:06
|
DeimosLand, весьма бесполезная публикация бесполезной фигни.
Сообщение # 11 написано 19.07.2012 в 13:38
|
| |||
| |||