aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/base/auth_database.sql1
-rw-r--r--sql/updates/auth/2013_04_22_00_auth_misc.sql21
-rw-r--r--sql/updates/world/2013_04_22_00_world_misc.sql7
3 files changed, 29 insertions, 0 deletions
diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql
index c3752e980dd..943be73b20f 100644
--- a/sql/base/auth_database.sql
+++ b/sql/base/auth_database.sql
@@ -34,6 +34,7 @@ CREATE TABLE `account` (
`last_ip` varchar(15) NOT NULL DEFAULT '127.0.0.1',
`failed_logins` int(10) unsigned NOT NULL DEFAULT '0',
`locked` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `lock_country` varchar(2) NOT NULL DEFAULT '00',
`last_login` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`online` tinyint(3) unsigned NOT NULL DEFAULT '0',
`expansion` tinyint(3) unsigned NOT NULL DEFAULT '2',
diff --git a/sql/updates/auth/2013_04_22_00_auth_misc.sql b/sql/updates/auth/2013_04_22_00_auth_misc.sql
new file mode 100644
index 00000000000..508c0aab944
--- /dev/null
+++ b/sql/updates/auth/2013_04_22_00_auth_misc.sql
@@ -0,0 +1,21 @@
+ALTER TABLE `account` ADD COLUMN `lock_country` VARCHAR(2) NOT NULL DEFAULT '00' AFTER `locked`;
+
+DROP TABLE IF EXISTS ip2nation;
+CREATE TABLE ip2nation (
+ ip int(11) unsigned NOT NULL default '0',
+ country char(2) NOT NULL default '',
+ KEY ip (ip)
+);
+
+DROP TABLE IF EXISTS ip2nationCountries;
+CREATE TABLE ip2nationCountries (
+ code varchar(4) NOT NULL default '',
+ iso_code_2 varchar(2) NOT NULL default '',
+ iso_code_3 varchar(3) default '',
+ iso_country varchar(255) NOT NULL default '',
+ country varchar(255) NOT NULL default '',
+ lat float NOT NULL default '0',
+ lon float NOT NULL default '0',
+ PRIMARY KEY (code),
+ KEY code (code)
+);
diff --git a/sql/updates/world/2013_04_22_00_world_misc.sql b/sql/updates/world/2013_04_22_00_world_misc.sql
new file mode 100644
index 00000000000..99eee20ffef
--- /dev/null
+++ b/sql/updates/world/2013_04_22_00_world_misc.sql
@@ -0,0 +1,7 @@
+DROP TABLE IF EXISTS ip2nation;
+DROP TABLE IF EXISTS ip2nationCountries;
+
+DELETE FROM `command` WHERE `name` in ('account lock', 'account lock ip', 'account lock country');
+INSERT INTO `command` (`name`,`security`,`help`) VALUES
+('account lock ip', 0, 'Syntax: .account lock ip [on|off]\nAllow login from account only from current used IP or remove this requirement.'),
+('account lock country', 0, 'Syntax: .account lock country [on|off]\nAllow login from account only from current used Country or remove this requirement.');