Главная Форум Файлы
Вы находитесь: Wow-Good.Ru » WoW » Mists of Pandaria




Страница 1 из 11
Модератор форума: Влад 
Форум » TrinityCore » Патчи » [patch] Антимат
[patch] Антимат
Dispeller Дата: Воскресенье, 26.08.2012, 21:35 | Сообщение # 1
Сержант
Сообщений: 59
Репутация: 1
Награды: 0
Выкладываю для Вас патч - Антимат.

Что может делать скрипт:

фильтровать чат
определять мат в чате
попытки обменять персонажей
оскорбление администрации

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еЦ


Скачать патч.

Источник

 
Форум » TrinityCore » Патчи » [patch] Антимат
Страница 1 из 11
Поиск: