aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorLejo <Lejo_1@web.de>2020-07-12 10:47:52 +0300
committerGitHub <noreply@github.com>2020-07-12 09:47:52 +0200
commit1dd6c8ed7fc8b56385546437baa54d53b43a385f (patch)
treeb00f12303bb89b3c68e41daa88e28351fc5c044f /src/network
parente0499731a867c76005f7cd83ee18c1a9503da719 (diff)
downloadminetest-1dd6c8ed7fc8b56385546437baa54d53b43a385f.tar.gz
minetest-1dd6c8ed7fc8b56385546437baa54d53b43a385f.tar.bz2
minetest-1dd6c8ed7fc8b56385546437baa54d53b43a385f.zip
Add reconnect button on error: Too many players (#9405)
Diffstat (limited to 'src/network')
-rw-r--r--src/network/clientpackethandler.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp
index 5934eaf8c..8d87ff8f2 100644
--- a/src/network/clientpackethandler.cpp
+++ b/src/network/clientpackethandler.cpp
@@ -208,6 +208,9 @@ void Client::handleCommand_AccessDenied(NetworkPacket* pkt)
m_access_denied_reconnect = reconnect & 1;
} else if (denyCode == SERVER_ACCESSDENIED_CUSTOM_STRING) {
*pkt >> m_access_denied_reason;
+ } else if (denyCode == SERVER_ACCESSDENIED_TOO_MANY_USERS) {
+ m_access_denied_reason = accessDeniedStrings[denyCode];
+ m_access_denied_reconnect = true;
} else if (denyCode < SERVER_ACCESSDENIED_MAX) {
m_access_denied_reason = accessDeniedStrings[denyCode];
} else {