aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/serverpackethandler.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp
index 62da136ad..ecf4306c8 100644
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -209,13 +209,10 @@ void Server::handleCommand_Init(NetworkPacket* pkt)
<< addr_s << " (peer_id=" << pkt->getPeerId() << ")" << std::endl;
// Enforce user limit.
- // Don't enforce for users that have some admin right
+ // Don't enforce for users that have some admin right or mod permits it.
if (m_clients.isUserLimitReached() &&
- !checkPriv(playername, "server") &&
- !checkPriv(playername, "ban") &&
- !checkPriv(playername, "privs") &&
- !checkPriv(playername, "password") &&
- playername != g_settings->get("name")) {
+ playername != g_settings->get("name") &&
+ !m_script->can_bypass_userlimit(playername, addr_s)) {
actionstream << "Server: " << playername << " tried to join from "
<< addr_s << ", but there" << " are already max_users="
<< g_settings->getU16("max_users") << " players." << std::endl;