aboutsummaryrefslogtreecommitdiff
path: root/src/network/serverpackethandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/serverpackethandler.cpp')
-rw-r--r--src/network/serverpackethandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp
index 2151450d2..b0fb17b72 100644
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -211,7 +211,7 @@ void Server::handleCommand_Init(NetworkPacket* pkt)
// Enforce user limit.
// Don't enforce for users that have some admin right
- if (m_clients.getClientIDs(CS_Created).size() >= g_settings->getU16("max_users") &&
+ if (m_clients.isUserLimitReached() &&
!checkPriv(playername, "server") &&
!checkPriv(playername, "ban") &&
!checkPriv(playername, "privs") &&
@@ -520,7 +520,7 @@ void Server::handleCommand_Init_Legacy(NetworkPacket* pkt)
// Enforce user limit.
// Don't enforce for users that have some admin right
- if (m_clients.getClientIDs(CS_Created).size() >= g_settings->getU16("max_users") &&
+ if (m_clients.isUserLimitReached() >= g_settings->getU16("max_users") &&
!checkPriv(playername, "server") &&
!checkPriv(playername, "ban") &&
!checkPriv(playername, "privs") &&