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 --- sql/updates/auth/2014_05_02_00_action_ip_logger.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sql/updates/auth/2014_05_02_00_action_ip_logger.sql (limited to 'sql/updates/auth') diff --git a/sql/updates/auth/2014_05_02_00_action_ip_logger.sql b/sql/updates/auth/2014_05_02_00_action_ip_logger.sql new file mode 100644 index 00000000000..f5603738f54 --- /dev/null +++ b/sql/updates/auth/2014_05_02_00_action_ip_logger.sql @@ -0,0 +1,18 @@ +ALTER TABLE `account` + ADD COLUMN `last_attempt_ip` VARCHAR(15) NOT NULL DEFAULT '127.0.0.1' AFTER `last_ip`; + +CREATE TABLE `logs_ip_actions` ( +`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Unique Identifier', +`account_id` INT(10) UNSIGNED NOT NULL COMMENT 'Account ID', +`character_guid` INT(10) UNSIGNED NOT NULL COMMENT 'Character Guid', +`type` TINYINT(3) UNSIGNED NOT NULL, +`ip` VARCHAR(15) NOT NULL DEFAULT '127.0.0.1', +`systemnote` TEXT NULL COMMENT 'Notes inserted by system', +`unixtime` INT(10) UNSIGNED NOT NULL COMMENT 'Unixtime', +`time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Timestamp', +`comment` TEXT NULL COMMENT 'Allows users to add a comment', +PRIMARY KEY (`id`) +) +COMMENT='Used to log ips of individual actions' +COLLATE='utf8_general_ci' +ENGINE=InnoDB; -- cgit v1.2.3