aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2018-01-06 12:28:38 +0100
committerShauren <shauren.trinity@gmail.com>2018-01-06 12:30:28 +0100
commitb2b4f9d1e4562ec246efb5136c1c674ec78f50b7 (patch)
treeba0d81ce1ba02528599030fde736f30c19d49d72 /src/server/scripts/Commands
parent6da6f1b415be2e7964c7c15c87b29a38052e76e4 (diff)
Core/Misc: Added compatibility layer for boost 1.66 and future std:: networking stuff
* Based on work done by @dimiandre in PR #21173 Closes #21171 Closes #21173 (cherry picked from commit dfd2660a85e4f0891c63009ee8425b2796586409)
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_account.cpp4
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp
index 0da1d637191..bd0ae263d68 100644
--- a/src/server/scripts/Commands/cs_account.cpp
+++ b/src/server/scripts/Commands/cs_account.cpp
@@ -25,13 +25,13 @@ EndScriptData */
#include "AccountMgr.h"
#include "Chat.h"
#include "DatabaseEnv.h"
+#include "IpAddress.h"
#include "Language.h"
#include "Log.h"
#include "Player.h"
#include "ScriptMgr.h"
#include "World.h"
#include "WorldSession.h"
-#include <boost/asio/ip/address_v4.hpp>
class account_commandscript : public CommandScript
{
@@ -291,7 +291,7 @@ public:
if (param == "on")
{
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_LOGON_COUNTRY);
- uint32 ip = boost::asio::ip::address_v4::from_string(handler->GetSession()->GetRemoteAddress()).to_ulong();
+ uint32 ip = Trinity::Net::address_to_uint(Trinity::Net::make_address_v4(handler->GetSession()->GetRemoteAddress()));
EndianConvertReverse(ip);
stmt->setUInt32(0, ip);
PreparedQueryResult result = LoginDatabase.Query(stmt);
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index cc28b2da8ab..3829ca3afa2 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -27,6 +27,7 @@
#include "Group.h"
#include "GroupMgr.h"
#include "InstanceSaveMgr.h"
+#include "IpAddress.h"
#include "Item.h"
#include "Language.h"
#include "LFG.h"
@@ -48,7 +49,6 @@
#include "WeatherMgr.h"
#include "World.h"
#include "WorldSession.h"
-#include <boost/asio/ip/address_v4.hpp>
// temporary hack until includes are sorted out (don't want to pull in Windows.h)
#ifdef GetClassName
@@ -1700,7 +1700,7 @@ public:
lastIp = fields[4].GetString();
lastLogin = fields[5].GetString();
- uint32 ip = boost::asio::ip::address_v4::from_string(lastIp).to_ulong();
+ uint32 ip = Trinity::Net::address_to_uint(Trinity::Net::make_address_v4(lastIp));
EndianConvertReverse(ip);
// If ip2nation table is populated, it displays the country