Implement ip2nation and ip2nationCountries (#518)

* Implement ip2nation and ip2nationCountries

* fix account.sql

* Tabs

* Codestyle

* More codestyle

* Maybe not. Fk travis.

* Missing field on LOGIN_SEL_ACCOUNT_INFO_BY_NAME

* Update WorldSocket.cpp
This commit is contained in:
Nefertumm
2017-08-20 01:00:00 -03:00
committed by Yehonal
parent 0dd68dfbee
commit fd684a858c
9 changed files with 161 additions and 25 deletions

View File

@@ -0,0 +1,23 @@
INSERT INTO version_db_auth (`sql_rev`) VALUES ('1498796201292521600');
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`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
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`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;