From 6949735098144e478451e73179ca2d9c6e7344f7 Mon Sep 17 00:00:00 2001 From: Ascathor Date: Fri, 2 May 2014 03:44:21 +0200 Subject: Core/Misc: * Fix some codestyle, fix some typos * Change CMakeLists for: Custom (can be uncommented), Events, World ** Custom is theoretically unchanged. You can, however, uncomment the glob_recurse that initializes every file within. This might be easier for beginners. * Introducing the IP Based Action Log System: ** On several different actions, e.g. Login, Character Login, etc., a new entry is added ** Can be logged on and off in worldserver config *** Disabled by default to prevent increased log db size for unknowing users. * Add a new row to account table called 'last_attempt_ip' ** Lists the last ip trying to connect to the account * Add a new type of HookScripts: AccountScript ** Includes: OnAccountLogin, OnFailedAccountLogin, OnEmailChange, OnFailedChange, OnPasswordChange, OnFailedPasswordChange * Added new Hook to PlayerScripts: OnFailedPlayerDelete * Added new variables to PlayerScripts: OnPlayerDelete --- src/server/game/Scripting/ScriptLoader.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/server/game/Scripting/ScriptLoader.cpp') diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp index 7365d592a62..1e5b31f448a 100644 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -16,6 +16,7 @@ */ #include "ScriptLoader.h" +#include "World.h" //examples void AddSC_example_creature(); @@ -41,7 +42,7 @@ void AddSC_item_spell_scripts(); void AddSC_example_spell_scripts(); void AddSC_holiday_spell_scripts(); -void AddSC_SmartSCripts(); +void AddSC_SmartScripts(); //Commands void AddSC_account_commandscript(); @@ -97,6 +98,7 @@ void AddSC_npc_innkeeper(); void AddSC_npcs_special(); void AddSC_npc_taxi(); void AddSC_achievement_scripts(); +void AddSC_action_ip_logger(); //eastern kingdoms void AddSC_alterac_valley(); //Alterac Valley @@ -696,6 +698,7 @@ void AddSC_outdoorpvp_zm(); // player void AddSC_chat_log(); +void AddSC_action_ip_logger(); #endif @@ -703,7 +706,7 @@ void AddScripts() { AddExampleScripts(); AddSpellScripts(); - AddSC_SmartSCripts(); + AddSC_SmartScripts(); AddCommandScripts(); #ifdef SCRIPTS AddWorldScripts(); @@ -804,7 +807,10 @@ void AddWorldScripts() AddSC_npcs_special(); AddSC_npc_taxi(); AddSC_achievement_scripts(); - AddSC_chat_log(); + AddSC_chat_log(); // location: scripts\World\chat_log.cpp + // To avoid duplicate code, we check once /*ONLY*/ if logging is permitted or not. + if (sWorld->getBoolConfig(CONFIG_IP_BASED_ACTION_LOGGING)) + AddSC_action_ip_logger(); // location: scripts\World\action_ip_logger.cpp #endif } -- cgit v1.2.3