Implement ip2nation and ip2nationCountries
This commit is contained in:
parent
ef57d9ba69
commit
9d2484bfc7
8 changed files with 143 additions and 7 deletions
|
|
@ -1883,7 +1883,19 @@ public:
|
|||
#if TRINITY_ENDIAN == BIGENDIAN
|
||||
EndianConvertReverse(ip);
|
||||
#endif
|
||||
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_IP2NATION_COUNTRY);
|
||||
|
||||
stmt->setUInt32(0, ip);
|
||||
|
||||
PreparedQueryResult result2 = WorldDatabase.Query(stmt);
|
||||
|
||||
if (result2)
|
||||
{
|
||||
Field* fields2 = result2->Fetch();
|
||||
lastIp.append(" (");
|
||||
lastIp.append(fields2[0].GetString());
|
||||
lastIp.append(")");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue