All pastes #2090518 Raw Edit

Anonymous

public diff v1 · immutable
#2090518 ·published 2011-10-16 17:23 UTC
rendered paste body
diff --git a/src/game/ChatLexicsCutter.cpp b/src/game/ChatLexicsCutter.cppindex 1713c20..3fdc5b4 100644--- a/src/game/ChatLexicsCutter.cpp+++ b/src/game/ChatLexicsCutter.cpp@@ -1,4 +1,4 @@-/*+/*  * Copyright (C) 2005,2006,2007 MaNGOS <http://www.mangosproject.org/>  *  * This program is free software; you can redistribute it and/or modify@@ -18,17 +18,6 @@ #include "Common.h" #include "ChatLexicsCutter.h" #include "Log.h"--static int const trailingBytesForUTF8[256] = {-    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-    2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5-}; LexicsCutter::LexicsCutter() {@@ -96,12 +84,12 @@ bool LexicsCutter::Read_Letter_Analogs(std::string& FileName)         }         // check for empty string-        line_s = line;+        line_s = line;         line_s = trim(line_s, "\x0A\x0D\x20");         if (line_s == "") continue;         // process line without CR/LF-        line_s = line;+        line_s = line;         line_s = trim(line_s, "\x0A\x0D");         pos = 0;@@ -160,12 +148,12 @@ bool LexicsCutter::Read_Innormative_Words(std::string& FileName)         }         // check for empty string-        line_s = line;+        line_s = line;         line_s = trim(line_s, "\x0A\x0D\x20");         if (line_s == "") continue;         // process line without CR/LF-        line_s = line;+        line_s = line;         line_s = trim(line_s, "\x0A\x0D");         // create word vector of vectors@@ -219,11 +207,11 @@ void LexicsCutter::Map_Innormative_Words() bool LexicsCutter::Compare_Word(std::string& str, unsigned int pos, LC_WordVector word) {-   std::string lchar_prev;+    std::string lchar_prev;     std::string lchar;-   // read first letter of the word into lchar_prev-   ReadUTF8(str, lchar, pos);+    // read first letter of the word into lchar_prev+    ReadUTF8(str, lchar, pos);     // okay, here we go, comparing word     // first letter is already okay, we do begin from second and go on@@ -236,23 +224,23 @@ bool LexicsCutter::Compare_Word(std::string& str, unsigned int pos, LC_WordVecto         // check, if the letter is in the set         LC_LetterSet ls = *i;         if (ls.count(lchar) == 0)-       {-           // letter is not in set, but we must check, if it is not space or repeat-           if ( (!(IgnoreMiddleSpaces && (lchar == " "))) &&-               (!(IgnoreLetterRepeat && (lchar == lchar_prev))) )-           {-               // no checks viable-               return(false);-           }-       }-       else-       {-           // next word letter-           i++;-       }-       // set previous string letter to compare if needed (this check can really conserve time)-       if (IgnoreLetterRepeat) lchar_prev = lchar;-   }+        {+            // letter is not in set, but we must check, if it is not space or repeat+            if ( (!(IgnoreMiddleSpaces && (lchar == " "))) &&+                (!(IgnoreLetterRepeat && (lchar == lchar_prev))) )+            {+                // no checks viable+                return(false);+            }+        }+        else+        {+            // next word letter+            i++;+        }+        // set previous string letter to compare if needed (this check can really conserve time)+        if (IgnoreLetterRepeat) lchar_prev = lchar;+    }     return(true); }@@ -278,7 +266,7 @@ bool LexicsCutter::Check_Lexics(std::string& Phrase)     }     // string prepared, now parse it and scan for all the words-   unsigned int pos_prev = 0;+    unsigned int pos_prev = 0;     pos = 0;     while (ReadUTF8(str, lchar, pos))     {diff --git a/src/game/ChatLexicsCutter.h b/src/game/ChatLexicsCutter.hindex b0aed9c..38d636c 100644--- a/src/game/ChatLexicsCutter.h+++ b/src/game/ChatLexicsCutter.h@@ -1,4 +1,4 @@-/*+/*  * Copyright (C) 2005,2006,2007 MaNGOS <http://www.mangosproject.org/>  *  * This program is free software; you can redistribute it and/or modify@@ -26,6 +26,17 @@ typedef std::vector< LC_LetterSet > LC_WordVector; typedef std::vector< LC_WordVector > LC_WordList; typedef std::multimap< std::string, unsigned int > LC_WordMap;+static int trailingBytesForUTF8[256] = {+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,+    2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5+};+ class LexicsCutter {     protected:@@ -46,10 +57,11 @@ class LexicsCutter         void Map_Innormative_Words();         bool Compare_Word(std::string& str, unsigned int pos, LC_WordVector word);         bool Check_Lexics(std::string& Phrase);-+         std::vector< std::pair< unsigned int, unsigned int > > Found;         bool IgnoreMiddleSpaces;         bool IgnoreLetterRepeat; }; #endif+diff --git a/src/game/ChatLog.cpp b/src/game/ChatLog.cppindex 0c5ea81..3aaebfa 100644--- a/src/game/ChatLog.cpp+++ b/src/game/ChatLog.cpp@@ -1,4 +1,4 @@-/*+/*  * Copyright (C) 2005,2006,2007 MaNGOS <http://www.mangosproject.org/>  *  * This program is free software; you can redistribute it and/or modify@@ -22,12 +22,10 @@ #include "Chat.h" #include "Group.h" #include "Guild.h"-#include "ObjectMgr.h" #include "GuildMgr.h"-#include "ObjectGuid.h"+#include "ObjectMgr.h" #include "SpellAuras.h" #include "Policies/SingletonImp.h"-#include "Config/Config.h" INSTANTIATE_SINGLETON_1( ChatLog );@@ -42,92 +40,31 @@ ChatLog::ChatLog()     Lexics = NULL;     fn_innormative = "";     f_innormative = NULL;--    Initialize(); } ChatLog::~ChatLog() {-    // close all files (avoiding double-close)-    CloseAllFiles();--    if (Lexics)-    {-        delete Lexics;-        Lexics = NULL;-    }+    Uninitialize(); } void ChatLog::Initialize() {-    // determine, if the chat logs are enabled-    ChatLogEnable = sConfig.GetBoolDefault("ChatLogEnable", false);-    ChatLogDateSplit = sConfig.GetBoolDefault("ChatLogDateSplit", false);-    ChatLogUTFHeader = sConfig.GetBoolDefault("ChatLogUTFHeader", false);-    ChatLogIgnoreUnprintable = sConfig.GetBoolDefault("ChatLogIgnoreUnprintable", false);--    if (ChatLogEnable)+    if (fn_analogsfile == "" || fn_wordsfile == "")     {-        // read chat log file names-        names[CHAT_LOG_CHAT] = sConfig.GetStringDefault("ChatLogChatFile", "");-        names[CHAT_LOG_PARTY] = sConfig.GetStringDefault("ChatLogPartyFile", "");-        names[CHAT_LOG_GUILD] = sConfig.GetStringDefault("ChatLogGuildFile", "");-        names[CHAT_LOG_WHISPER] = sConfig.GetStringDefault("ChatLogWhisperFile", "");-        names[CHAT_LOG_CHANNEL] = sConfig.GetStringDefault("ChatLogChannelFile", "");-        names[CHAT_LOG_RAID] = sConfig.GetStringDefault("ChatLogRaidFile", "");-        names[CHAT_LOG_BATTLEGROUND] = sConfig.GetStringDefault("ChatLogBattleGroundFile", "");--        // read screen log flags-        screenflag[CHAT_LOG_CHAT] = sConfig.GetBoolDefault("ChatLogChatScreen", false);-        screenflag[CHAT_LOG_PARTY] = sConfig.GetBoolDefault("ChatLogPartyScreen", false);-        screenflag[CHAT_LOG_GUILD] = sConfig.GetBoolDefault("ChatLogGuildScreen", false);-        screenflag[CHAT_LOG_WHISPER] = sConfig.GetBoolDefault("ChatLogWhisperScreen", false);-        screenflag[CHAT_LOG_CHANNEL] = sConfig.GetBoolDefault("ChatLogChannelScreen", false);-        screenflag[CHAT_LOG_RAID] = sConfig.GetBoolDefault("ChatLogRaidScreen", false);-        screenflag[CHAT_LOG_BATTLEGROUND] = sConfig.GetBoolDefault("ChatLogBattleGroundScreen", false);+        LexicsCutterEnable = false;     }-    // lexics cutter-    LexicsCutterEnable = sConfig.GetBoolDefault("LexicsCutterEnable", false);-     if (LexicsCutterEnable)     {-        // initialize lexics cutter parameters-        LexicsCutterInnormativeCut = sConfig.GetBoolDefault("LexicsCutterInnormativeCut", true);-        LexicsCutterNoActionOnGM = sConfig.GetBoolDefault("LexicsCutterNoActionOnGM", true);-        LexicsCutterScreenLog = sConfig.GetBoolDefault("LexicsCutterScreenLog", false);-        LexicsCutterCutReplacement = sConfig.GetStringDefault("LexicsCutterCutReplacement", "&!@^%!^&*!!! [gibberish]");-        LexicsCutterAction = sConfig.GetIntDefault("LexicsCutterAction", 0);-        LexicsCutterActionDuration = sConfig.GetIntDefault("LexicsCutterActionDuration", 60000);-        std::string fn_analogsfile = sConfig.GetStringDefault("LexicsCutterAnalogsFile", "");-        std::string fn_wordsfile = sConfig.GetStringDefault("LexicsCutterWordsFile", "");--        // read lexics cutter flags-        cutflag[CHAT_LOG_CHAT] = sConfig.GetBoolDefault("LexicsCutInChat", true);-        cutflag[CHAT_LOG_PARTY] = sConfig.GetBoolDefault("LexicsCutInParty", true);-        cutflag[CHAT_LOG_GUILD] = sConfig.GetBoolDefault("LexicsCutInGuild", true);-        cutflag[CHAT_LOG_WHISPER] = sConfig.GetBoolDefault("LexicsCutInWhisper", true);-        cutflag[CHAT_LOG_CHANNEL] = sConfig.GetBoolDefault("LexicsCutInChannel", true);-        cutflag[CHAT_LOG_RAID] = sConfig.GetBoolDefault("LexicsCutInRaid", true);-        cutflag[CHAT_LOG_BATTLEGROUND] = sConfig.GetBoolDefault("LexicsCutInBattleGround", true);--        if (fn_analogsfile == "" || fn_wordsfile == "")-        {-            LexicsCutterEnable = false;-        }-        else-        {-            // initialize lexics cutter-            Lexics = new LexicsCutter;-            if (Lexics) Lexics->Read_Letter_Analogs(fn_analogsfile);-            if (Lexics) Lexics->Read_Innormative_Words(fn_wordsfile);-            if (Lexics) Lexics->Map_Innormative_Words();--            // read additional parameters-            Lexics->IgnoreLetterRepeat = sConfig.GetBoolDefault("LexicsCutterIgnoreRepeats", true);-            Lexics->IgnoreMiddleSpaces = sConfig.GetBoolDefault("LexicsCutterIgnoreSpaces", true);-            fn_innormative = sConfig.GetStringDefault("LexicsCutterLogFile", "");-        }+        // initialize lexics cutter+        Lexics = new LexicsCutter;+        if (Lexics) Lexics->Read_Letter_Analogs(fn_analogsfile);+        if (Lexics) Lexics->Read_Innormative_Words(fn_wordsfile);+        if (Lexics) Lexics->Map_Innormative_Words();++        // read additional parameters+        Lexics->IgnoreLetterRepeat = LexicsCutterIgnoreLetterRepeat;+        Lexics->IgnoreMiddleSpaces = LexicsCutterIgnoreMiddleSpaces;     }     // open all files (with aliasing)@@ -137,6 +74,18 @@ void ChatLog::Initialize()     WriteInitStamps(); }+void ChatLog::Uninitialize()+{+    // close all files (avoiding double-close)+    CloseAllFiles();++    if (Lexics)+    {+        delete Lexics;+        Lexics = NULL;+    }+}+ bool ChatLog::_ChatCommon(int ChatType, Player *player, std::string &msg) {     if (LexicsCutterEnable && Lexics && cutflag[ChatType] && Lexics->Check_Lexics(msg)) ChatBadLexicsAction(player, msg);@@ -218,8 +167,8 @@ void ChatLog::PartyMsg(Player *player, std::string &msg)         // obtain group information         log_str.append("[");-        //uint8 gm_count = group->GetMembersCount();-        //uint8 gm_count_m1 = gm_count - 1;+        uint8 gm_count = group->GetMembersCount();+        uint8 gm_count_m1 = gm_count - 1;         ObjectGuid gm_leader_GUID = group->GetLeaderGuid();         Player *gm_member;@@ -231,7 +180,7 @@ void ChatLog::PartyMsg(Player *player, std::string &msg)         }         Group::MemberSlotList g_members = group->GetMemberSlots();-+         for (Group::member_citerator itr = g_members.begin(); itr != g_members.end(); itr++)         {             if (itr->guid == gm_leader_GUID) continue;@@ -251,7 +200,7 @@ void ChatLog::PartyMsg(Player *player, std::string &msg)     log_str.append(msg);     log_str.append("\n");-+     if (screenflag[CHAT_LOG_PARTY]) printf("%s", log_str.c_str());     if (files[CHAT_LOG_PARTY])     {@@ -354,7 +303,7 @@ void ChatLog::ChannelMsg(Player *player, std::string &channel, std::string &msg)     log_str.append("[");     log_str.append(player->GetName());     log_str.append("]->CHANNEL:");-+     if (channel.size() == 0)     {         log_str.append("[unknown channel] ");@@ -407,7 +356,7 @@ void ChatLog::RaidMsg(Player *player, std::string &msg, uint32 type)         default:         log_str.append("]->RAID_UNKNOWN:");     }-+     Group *group = player->GetGroup();     if (!group)     {@@ -418,8 +367,8 @@ void ChatLog::RaidMsg(Player *player, std::string &msg, uint32 type)         // obtain group information         log_str.append("[");-        //uint8 gm_count = group->GetMembersCount();-        //uint8 gm_count_m1 = gm_count - 1;+        uint8 gm_count = group->GetMembersCount();+        uint8 gm_count_m1 = gm_count - 1;         ObjectGuid gm_leader_GUID = group->GetLeaderGuid();         Player *gm_member;@@ -496,8 +445,8 @@ void ChatLog::BattleGroundMsg(Player *player, std::string &msg, uint32 type)         // obtain group information         log_str.append("[");-        //uint8 gm_count = group->GetMembersCount();-        //uint8 gm_count_m1 = gm_count - 1;+        uint8 gm_count = group->GetMembersCount();+        uint8 gm_count_m1 = gm_count - 1;         ObjectGuid gm_leader_GUID = group->GetLeaderGuid();         Player *gm_member;@@ -732,14 +681,14 @@ void ChatLog::ChatBadLexicsAction(Player* player, std::string& msg)         case LEXICS_ACTION_SHEEP:         {             // sheep me, yeah, yeah, sheep me-            player->_AddAura(118,LexicsCutterActionDuration);+            player->_AddAura(118, LexicsCutterActionDuration);         }         break;         case LEXICS_ACTION_STUN:         {             // stunned surprised-            player->_AddAura(13005,LexicsCutterActionDuration);+            player->_AddAura(13005, LexicsCutterActionDuration);         }         break;@@ -757,6 +706,7 @@ void ChatLog::ChatBadLexicsAction(Player* player, std::string& msg)         }         break;+         case LEXICS_ACTION_SILENCE:         {             // glue the mouth@@ -768,21 +718,21 @@ void ChatLog::ChatBadLexicsAction(Player* player, std::string& msg)         case LEXICS_ACTION_STUCK:         {             // yo, the Matrix has had you :) [by KAPATEJIb]-            player->_AddAura(23312,LexicsCutterActionDuration);+            player->_AddAura(23312, LexicsCutterActionDuration);         }         break;         case LEXICS_ACTION_SICKNESS:         {             // for absence of censorship, there is punishment [by Koshei]-            player->_AddAura(15007,LexicsCutterActionDuration);+            player->_AddAura(15007, LexicsCutterActionDuration);         }         break;         case LEXICS_ACTION_SHEAR:         {             // Lord Illidan to watch you [by Koshei]-            player->_AddAura(41032,LexicsCutterActionDuration);+            player->_AddAura(41032, LexicsCutterActionDuration);         }         break;diff --git a/src/game/ChatLog.h b/src/game/ChatLog.hindex e2962c8..8ed261c 100644--- a/src/game/ChatLog.h+++ b/src/game/ChatLog.h@@ -1,4 +1,4 @@-/*+/*  * Copyright (C) 2005,2006,2007 MaNGOS <http://www.mangosproject.org/>  *  * This program is free software; you can redistribute it and/or modify@@ -50,14 +50,15 @@ enum LexicsActions     LEXICS_ACTION_SHEAR = 8, };-class ChatLog : public MaNGOS::Singleton<ChatLog, MaNGOS::ClassLevelLockable<ChatLog, /*ZThread::Mutex*/ACE_Thread_Mutex> >+class ChatLog : public MaNGOS::Singleton<ChatLog, MaNGOS::ClassLevelLockable<ChatLog, ACE_Thread_Mutex> > {     public:         ChatLog();         ~ChatLog();         void Initialize();-+        void Uninitialize();+         void ChatMsg(Player *player, std::string &msg, uint32 type);         void PartyMsg(Player *player, std::string &msg);         void GuildMsg(Player *player, std::string &msg, bool officer);@@ -65,24 +66,16 @@ class ChatLog : public MaNGOS::Singleton<ChatLog, MaNGOS::ClassLevelLockable<Cha         void ChannelMsg(Player *player, std::string &channel, std::string &msg);         void RaidMsg(Player *player, std::string &msg, uint32 type);         void BattleGroundMsg(Player *player, std::string &msg, uint32 type);-+         void ChatBadLexicsAction(Player *player, std::string &msg);-    private:-        bool _ChatCommon(int ChatType, Player *player, std::string &msg);-         bool ChatLogEnable;         bool ChatLogDateSplit;         bool ChatLogUTFHeader;         bool ChatLogIgnoreUnprintable;--        int lastday;--        FILE* files[CHATLOG_CHAT_TYPES_COUNT];+         std::string names[CHATLOG_CHAT_TYPES_COUNT];         bool screenflag[CHATLOG_CHAT_TYPES_COUNT];--        LexicsCutter* Lexics;         bool cutflag[CHATLOG_CHAT_TYPES_COUNT];         bool LexicsCutterEnable;@@ -92,7 +85,21 @@ class ChatLog : public MaNGOS::Singleton<ChatLog, MaNGOS::ClassLevelLockable<Cha         std::string LexicsCutterCutReplacement;         int LexicsCutterAction;         int LexicsCutterActionDuration;+        bool LexicsCutterIgnoreMiddleSpaces;+        bool LexicsCutterIgnoreLetterRepeat;++        std::string fn_analogsfile;+        std::string fn_wordsfile;         std::string fn_innormative;+    private:+        bool _ChatCommon(int ChatType, Player *player, std::string &msg);++        FILE* files[CHATLOG_CHAT_TYPES_COUNT];++        int lastday;++        LexicsCutter* Lexics;+         FILE* f_innormative;         void OpenAllFiles();@@ -105,3 +112,4 @@ class ChatLog : public MaNGOS::Singleton<ChatLog, MaNGOS::ClassLevelLockable<Cha #define sChatLog MaNGOS::Singleton<ChatLog>::Instance() #endif+diff --git a/src/game/World.cpp b/src/game/World.cppindex bcaf92b..b5f9374 100644--- a/src/game/World.cpp+++ b/src/game/World.cpp@@ -27,6 +27,7 @@ #include "SystemConfig.h" #include "Log.h" #include "Opcodes.h"+#include "ChatLog.h" #include "WorldSession.h" #include "WorldPacket.h" #include "Weather.h"@@ -950,6 +951,65 @@ void World::LoadConfigSettings(bool reload)     sLog.outString( "WORLD: VMap support included. LineOfSight:%i, getHeight:%i, indoorCheck:%i",         enableLOS, enableHeight, getConfig(CONFIG_BOOL_VMAP_INDOOR_CHECK) ? 1 : 0);     sLog.outString( "WORLD: VMap data directory is: %svmaps",m_dataPath.c_str());++    // chat log and lexics cutter settings+    if (reload)+    {+        // reset chat logger / lexics cutter+        sChatLog.Uninitialize();+    }++    // read chat log parameters+    sChatLog.ChatLogEnable = sConfig.GetBoolDefault("ChatLogEnable", false);+    sChatLog.ChatLogDateSplit = sConfig.GetBoolDefault("ChatLogDateSplit", false);+    sChatLog.ChatLogUTFHeader = sConfig.GetBoolDefault("ChatLogUTFHeader", false);+    sChatLog.ChatLogIgnoreUnprintable = sConfig.GetBoolDefault("ChatLogIgnoreUnprintable", false);++    // read chat log file names+    sChatLog.names[CHAT_LOG_CHAT] = sConfig.GetStringDefault("ChatLogChatFile", "");+    sChatLog.names[CHAT_LOG_PARTY] = sConfig.GetStringDefault("ChatLogPartyFile", "");+    sChatLog.names[CHAT_LOG_GUILD] = sConfig.GetStringDefault("ChatLogGuildFile", "");+    sChatLog.names[CHAT_LOG_WHISPER] = sConfig.GetStringDefault("ChatLogWhisperFile", "");+    sChatLog.names[CHAT_LOG_CHANNEL] = sConfig.GetStringDefault("ChatLogChannelFile", "");+    sChatLog.names[CHAT_LOG_RAID] = sConfig.GetStringDefault("ChatLogRaidFile", "");+    sChatLog.names[CHAT_LOG_BATTLEGROUND] = sConfig.GetStringDefault("ChatLogBattleGroundFile", "");++    // read screen log flags+    sChatLog.screenflag[CHAT_LOG_CHAT] = sConfig.GetBoolDefault("ChatLogChatScreen", false);+    sChatLog.screenflag[CHAT_LOG_PARTY] = sConfig.GetBoolDefault("ChatLogPartyScreen", false);+    sChatLog.screenflag[CHAT_LOG_GUILD] = sConfig.GetBoolDefault("ChatLogGuildScreen", false);+    sChatLog.screenflag[CHAT_LOG_WHISPER] = sConfig.GetBoolDefault("ChatLogWhisperScreen", false);+    sChatLog.screenflag[CHAT_LOG_CHANNEL] = sConfig.GetBoolDefault("ChatLogChannelScreen", false);+    sChatLog.screenflag[CHAT_LOG_RAID] = sConfig.GetBoolDefault("ChatLogRaidScreen", false);+    sChatLog.screenflag[CHAT_LOG_BATTLEGROUND] = sConfig.GetBoolDefault("ChatLogBattleGroundScreen", false);++    // lexics cutter+    sChatLog.LexicsCutterEnable = sConfig.GetBoolDefault("LexicsCutterEnable", false);++    // initialize lexics cutter parameters+    sChatLog.LexicsCutterInnormativeCut = sConfig.GetBoolDefault("LexicsCutterInnormativeCut", true);+    sChatLog.LexicsCutterNoActionOnGM = sConfig.GetBoolDefault("LexicsCutterNoActionOnGM", true);+    sChatLog.LexicsCutterScreenLog = sConfig.GetBoolDefault("LexicsCutterScreenLog", false);+    sChatLog.LexicsCutterCutReplacement = sConfig.GetStringDefault("LexicsCutterCutReplacement", "&!@^%!^&*!!! [gibberish]");+    sChatLog.LexicsCutterAction = sConfig.GetIntDefault("LexicsCutterAction", 0);+    sChatLog.LexicsCutterActionDuration = sConfig.GetIntDefault("LexicsCutterActionDuration", 60000);+    sChatLog.LexicsCutterIgnoreLetterRepeat = sConfig.GetBoolDefault("LexicsCutterIgnoreRepeats", true);+    sChatLog.LexicsCutterIgnoreMiddleSpaces = sConfig.GetBoolDefault("LexicsCutterIgnoreSpaces", true);+    sChatLog.fn_analogsfile = sConfig.GetStringDefault("LexicsCutterAnalogsFile", "");+    sChatLog.fn_wordsfile = sConfig.GetStringDefault("LexicsCutterWordsFile", "");+    sChatLog.fn_innormative = sConfig.GetStringDefault("LexicsCutterLogFile", "");++    // read lexics cutter flags+    sChatLog.cutflag[CHAT_LOG_CHAT] = sConfig.GetBoolDefault("LexicsCutInChat", true);+    sChatLog.cutflag[CHAT_LOG_PARTY] = sConfig.GetBoolDefault("LexicsCutInParty", true);+    sChatLog.cutflag[CHAT_LOG_GUILD] = sConfig.GetBoolDefault("LexicsCutInGuild", true);+    sChatLog.cutflag[CHAT_LOG_WHISPER] = sConfig.GetBoolDefault("LexicsCutInWhisper", true);+    sChatLog.cutflag[CHAT_LOG_CHANNEL] = sConfig.GetBoolDefault("LexicsCutInChannel", true);+    sChatLog.cutflag[CHAT_LOG_RAID] = sConfig.GetBoolDefault("LexicsCutInRaid", true);+    sChatLog.cutflag[CHAT_LOG_BATTLEGROUND] = sConfig.GetBoolDefault("LexicsCutInBattleGround", true);++    // initialize chat logs (and lexics cutter)+    sChatLog.Initialize(); } /// Initialize the World