diff --git a/bin/conf/PseuWoW.conf.default b/bin/conf/PseuWoW.conf.default index 39b0bea..00c3104 100644 --- a/bin/conf/PseuWoW.conf.default +++ b/bin/conf/PseuWoW.conf.default @@ -26,7 +26,7 @@ reconnect=5000 // 1 - show only known/handled // 2 - show only unknown/unhandled // 3 - show all -showopcodes=3 +showopcodes=0 // Hide opcodes which is coming very frequently? @@ -62,8 +62,8 @@ charname=Pseuwow // Client emulation configuration -ClientVersion=2.3.0 -ClientBuild=7561 +ClientVersion=2.3.3 +ClientBuild=7799 ClientLanguage=enUS // or change to enGB, deDE, ... @@ -71,7 +71,7 @@ ClientLanguage=enUS // packets get fetched every xx msecs. default=50 // setting this to 0 will let PseuWoW eat up all CPU power // 1 is a good setting for maximum network performance and lowest ping times -NetworkSleepTime=50 +NetworkSleepTime=1 // defines if players may say/yell/whisper commands to PseuWoW // set this to 0 and PseuWoW will not react to given commands diff --git a/src/Client/DefScript/DefScript.cpp b/src/Client/DefScript/DefScript.cpp index 827cd5f..aa20896 100644 --- a/src/Client/DefScript/DefScript.cpp +++ b/src/Client/DefScript/DefScript.cpp @@ -24,8 +24,11 @@ DefScriptPackage::DefScriptPackage() SetLog(printf); SetDebugLog(printf); SetErrorLog(printf); - hLogfile.open("DefScriptLog.txt",std::ios_base::out); - hLogfile << "DefScript engine execution log, compilation date: " __DATE__ " " __TIME__ "\n\n" ; + _DEFSC_DEBUG + ( + hLogfile.open("DefScriptLog.txt",std::ios_base::out); + hLogfile << "DefScript engine execution log, compilation date: " __DATE__ " " __TIME__ "\n\n" ; + ) _eventmgr=new DefScript_DynamicEventMgr(this); _InitFunctions(); # ifdef USING_DEFSCRIPT_EXTENSIONS @@ -38,7 +41,7 @@ DefScriptPackage::~DefScriptPackage() if(_eventmgr) delete _eventmgr; Clear(); - hLogfile.close(); + _DEFSC_DEBUG(hLogfile.close()); } void DefScriptPackage::Log(const char* fmt,...) @@ -1102,12 +1105,15 @@ std::string DefScriptPackage::_NormalizeVarName(std::string vn_in, std::string s DefReturnResult DefScriptPackage::Interpret(CmdSet& Set) { // TODO: remove this debug block again as soon as the interpreter bugs are fixed. - hLogfile << "PARENT: '" << Set.caller << "'\n"; - hLogfile << "cmd = '" << Set.cmd << "'\n"; - unsigned int ctr=0; - for(_CmdSetArgMap::iterator i=Set.arg.begin(); i!=Set.arg.end(); i++) - hLogfile << "arg[" << ctr++ << "] = '" << i->second << "'\n"; - hLogfile << "defaultarg = '" << Set.defaultarg << "'\n\n"; + _DEFSC_DEBUG + ( + hLogfile << "PARENT: '" << Set.caller << "'\n"; + hLogfile << "cmd = '" << Set.cmd << "'\n"; + unsigned int ctr=0; + for(_CmdSetArgMap::iterator i=Set.arg.begin(); i!=Set.arg.end(); i++) + hLogfile << "arg[" << ctr++ << "] = '" << i->second << "'\n"; + hLogfile << "defaultarg = '" << Set.defaultarg << "'\n\n"; + ); DefReturnResult result; diff --git a/src/Client/DefScript/DefScript.h b/src/Client/DefScript/DefScript.h index 86179f0..8aea225 100644 --- a/src/Client/DefScript/DefScript.h +++ b/src/Client/DefScript/DefScript.h @@ -177,7 +177,7 @@ private: std::map scriptPermissionMap; DefScriptFunctionTable _functable; _slog_func _slog,_serrorlog,_sdebuglog; - std::fstream hLogfile; + _DEFSC_DEBUG(std::fstream hLogfile); // Usable internal basic functions: DefReturnResult func_default(CmdSet&); diff --git a/src/Client/DefScript/DefScriptFunctions.cpp b/src/Client/DefScript/DefScriptFunctions.cpp index cfee77e..0b0efc7 100644 --- a/src/Client/DefScript/DefScriptFunctions.cpp +++ b/src/Client/DefScript/DefScriptFunctions.cpp @@ -378,9 +378,12 @@ DefReturnResult DefScriptPackage::func_equal(CmdSet& Set) result=Set.defaultarg==Set.arg[0]; // for debugging - char tmp[500]; - sprintf(tmp,"DEFSCRIPT: func_equal: ['%s'=='%s'] = %s\n",Set.arg[0].c_str(),Set.defaultarg.c_str(),result?"true":"false"); - hLogfile << tmp; + _DEFSC_DEBUG + ( + char tmp[500]; + sprintf(tmp,"DEFSCRIPT: func_equal: ['%s'=='%s'] = %s\n",Set.arg[0].c_str(),Set.defaultarg.c_str(),result?"true":"false"); + hLogfile << tmp; + ); return result; }