aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2012-03-23 05:35:32 +0100
committerclick <click@gonnamakeyou.com>2012-03-23 05:35:32 +0100
commit0fe4580fe0f526b864586a9cc3e7727be1980323 (patch)
tree87d3514c783f1eb188e22720ba9eba207449aca0 /sql
parent479c0976abaa24ac12ba4c47116ee282332e273f (diff)
Core/Commands: Add support for ip2nation database lookups when using .pinfo command.
This will (when a full database exists) allow for seeing (approximately) which country a player might be from when doing .pinfo <player> Note: External data required for this patch to work correctly can be found at http://www.ip2nation.com/ip2nation/Download Signed-off-by: click <click@gonnamakeyou.com>
Diffstat (limited to 'sql')
-rw-r--r--sql/updates/world/2012_03_23_00_world_ip2nation.sql21
1 files changed, 21 insertions, 0 deletions
diff --git a/sql/updates/world/2012_03_23_00_world_ip2nation.sql b/sql/updates/world/2012_03_23_00_world_ip2nation.sql
new file mode 100644
index 00000000000..dadeaddf85a
--- /dev/null
+++ b/sql/updates/world/2012_03_23_00_world_ip2nation.sql
@@ -0,0 +1,21 @@
+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)
+);