From 0c1149e02c79802daac45d3dc723cc3be58244d3 Mon Sep 17 00:00:00 2001 From: NotAFile Date: Mon, 25 Mar 2019 14:54:03 +0100 Subject: [PATCH 1/2] expand disconnect reasons add the new disconnect reasons --- Sources/Client/NetClient.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Sources/Client/NetClient.cpp b/Sources/Client/NetClient.cpp index 1e21733d6..b29727fd9 100644 --- a/Sources/Client/NetClient.cpp +++ b/Sources/Client/NetClient.cpp @@ -752,14 +752,12 @@ namespace spades { std::string NetClient::DisconnectReasonString(enet_uint32 num) { switch (num) { case 1: return _Tr("NetClient", "You are banned from this server."); - case 2: - // FIXME: this number seems to be used when per-IP connection limit was - // exceeded. - // we need to check other usages - return _Tr("NetClient", "You were kicked from this server."); + case 2: return _Tr("NetClient", "You have too many connections to this server."); case 3: return _Tr("NetClient", "Incompatible client protocol version."); case 4: return _Tr("NetClient", "Server full"); + case 4: return _Tr("NetClient", "Server was shut down"); case 10: return _Tr("NetClient", "You were kicked from this server."); + case 20: return _Tr("NetClient", "Invalid name"); default: return _Tr("NetClient", "Unknown Reason"); } } From a662ebe0d0588b709ffee30ff921093505b5b3d5 Mon Sep 17 00:00:00 2001 From: NotAFile Date: Mon, 25 Mar 2019 15:12:38 +0100 Subject: [PATCH 2/2] fix case value --- Sources/Client/NetClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Client/NetClient.cpp b/Sources/Client/NetClient.cpp index b29727fd9..b2534f5f3 100644 --- a/Sources/Client/NetClient.cpp +++ b/Sources/Client/NetClient.cpp @@ -755,7 +755,7 @@ namespace spades { case 2: return _Tr("NetClient", "You have too many connections to this server."); case 3: return _Tr("NetClient", "Incompatible client protocol version."); case 4: return _Tr("NetClient", "Server full"); - case 4: return _Tr("NetClient", "Server was shut down"); + case 5: return _Tr("NetClient", "Server was shut down"); case 10: return _Tr("NetClient", "You were kicked from this server."); case 20: return _Tr("NetClient", "Invalid name"); default: return _Tr("NetClient", "Unknown Reason");