diff options
author | savilli <78875209+savilli@users.noreply.github.com> | 2021-12-28 16:08:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-28 14:08:21 +0100 |
commit | 0fa54531d48eb2fcd09377a6fb8e7c81e09ada63 (patch) | |
tree | c3d62a6ea1362f6008b799b6ddbbca023fb4a8d4 /src/network/serverpackethandler.cpp | |
parent | cc64a0405ae0e4025f0b18be3bd0d813cb36fea0 (diff) | |
download | minetest-0fa54531d48eb2fcd09377a6fb8e7c81e09ada63.tar.gz minetest-0fa54531d48eb2fcd09377a6fb8e7c81e09ada63.tar.bz2 minetest-0fa54531d48eb2fcd09377a6fb8e7c81e09ada63.zip |
Fix check that denies new clients from a singleplayer session
Diffstat (limited to 'src/network/serverpackethandler.cpp')
-rw-r--r-- | src/network/serverpackethandler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index c1ddb5005..e5a1bab1e 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -86,7 +86,7 @@ void Server::handleCommand_Init(NetworkPacket* pkt) // Do not allow multiple players in simple singleplayer mode. // This isn't a perfect way to do it, but will suffice for now - if (m_simple_singleplayer_mode && m_clients.getClientIDs().size() > 1) { + if (m_simple_singleplayer_mode && !m_clients.getClientIDs().empty()) { infostream << "Server: Not allowing another client (" << addr_s << ") to connect in simple singleplayer mode" << std::endl; DenyAccess(peer_id, SERVER_ACCESSDENIED_SINGLEPLAYER); |