diff options
Diffstat (limited to 'src/scripts/Commands/cs_misc.cpp')
-rw-r--r-- | src/scripts/Commands/cs_misc.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/scripts/Commands/cs_misc.cpp b/src/scripts/Commands/cs_misc.cpp index 6fadd18e76..6ce0175e14 100644 --- a/src/scripts/Commands/cs_misc.cpp +++ b/src/scripts/Commands/cs_misc.cpp @@ -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 { |