summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/clientpackethandler.cpp2
-rw-r--r--src/network/serverpackethandler.cpp22
2 files changed, 12 insertions, 12 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp
index 1ec6a2a1a..4cebb2184 100644
--- a/src/network/clientpackethandler.cpp
+++ b/src/network/clientpackethandler.cpp
@@ -228,7 +228,7 @@ void Client::handleCommand_AccessDenied(NetworkPacket* pkt)
if (pkt->getSize() >= 2) {
std::wstring wide_reason;
*pkt >> wide_reason;
- m_access_denied_reason = wide_to_narrow(wide_reason);
+ m_access_denied_reason = wide_to_utf8(wide_reason);
}
}
}
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp
index 0a6ef4fa8..92dfe1020 100644
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -356,7 +356,7 @@ void Server::handleCommand_Init_Legacy(NetworkPacket* pkt)
DenyAccess_Legacy(pkt->getPeerId(), std::wstring(
L"Your client's version is not supported.\n"
L"Server version is ")
- + narrow_to_wide(g_version_string) + L"."
+ + utf8_to_wide(g_version_string) + L"."
);
return;
}
@@ -408,15 +408,15 @@ void Server::handleCommand_Init_Legacy(NetworkPacket* pkt)
DenyAccess_Legacy(pkt->getPeerId(), std::wstring(
L"Your client's version is not supported.\n"
L"Server version is ")
- + narrow_to_wide(g_version_string) + L",\n"
+ + utf8_to_wide(g_version_string) + L",\n"
+ L"server's PROTOCOL_VERSION is "
- + narrow_to_wide(itos(SERVER_PROTOCOL_VERSION_MIN))
+ + utf8_to_wide(itos(SERVER_PROTOCOL_VERSION_MIN))
+ L"..."
- + narrow_to_wide(itos(SERVER_PROTOCOL_VERSION_MAX))
+ + utf8_to_wide(itos(SERVER_PROTOCOL_VERSION_MAX))
+ L", client's PROTOCOL_VERSION is "
- + narrow_to_wide(itos(min_net_proto_version))
+ + utf8_to_wide(itos(min_net_proto_version))
+ L"..."
- + narrow_to_wide(itos(max_net_proto_version))
+ + utf8_to_wide(itos(max_net_proto_version))
);
return;
}
@@ -428,13 +428,13 @@ void Server::handleCommand_Init_Legacy(NetworkPacket* pkt)
DenyAccess_Legacy(pkt->getPeerId(), std::wstring(
L"Your client's version is not supported.\n"
L"Server version is ")
- + narrow_to_wide(g_version_string) + L",\n"
+ + utf8_to_wide(g_version_string) + L",\n"
+ L"server's PROTOCOL_VERSION (strict) is "
- + narrow_to_wide(itos(LATEST_PROTOCOL_VERSION))
+ + utf8_to_wide(itos(LATEST_PROTOCOL_VERSION))
+ L", client's PROTOCOL_VERSION is "
- + narrow_to_wide(itos(min_net_proto_version))
+ + utf8_to_wide(itos(min_net_proto_version))
+ L"..."
- + narrow_to_wide(itos(max_net_proto_version))
+ + utf8_to_wide(itos(max_net_proto_version))
);
return;
}
@@ -487,7 +487,7 @@ void Server::handleCommand_Init_Legacy(NetworkPacket* pkt)
<< "tried to connect from " << addr_s << " "
<< "but it was disallowed for the following reason: "
<< reason << std::endl;
- DenyAccess_Legacy(pkt->getPeerId(), narrow_to_wide(reason.c_str()));
+ DenyAccess_Legacy(pkt->getPeerId(), utf8_to_wide(reason.c_str()));
return;
}
}