diff options
author | Lejo <Lejo_1@web.de> | 2020-07-12 10:47:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-12 09:47:52 +0200 |
commit | 1dd6c8ed7fc8b56385546437baa54d53b43a385f (patch) | |
tree | b00f12303bb89b3c68e41daa88e28351fc5c044f /src/network/clientpackethandler.cpp | |
parent | e0499731a867c76005f7cd83ee18c1a9503da719 (diff) | |
download | minetest-1dd6c8ed7fc8b56385546437baa54d53b43a385f.tar.gz minetest-1dd6c8ed7fc8b56385546437baa54d53b43a385f.tar.bz2 minetest-1dd6c8ed7fc8b56385546437baa54d53b43a385f.zip |
Add reconnect button on error: Too many players (#9405)
Diffstat (limited to 'src/network/clientpackethandler.cpp')
-rw-r--r-- | src/network/clientpackethandler.cpp | 3 |
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 { |