mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 13:51:31 +00:00
Prevent more local players than the server maxplayers limit joining
This commit is contained in:
parent
e85e621d2c
commit
5d991b6f2a
1 changed files with 2 additions and 0 deletions
|
@ -3516,6 +3516,8 @@ static void HandleConnect(SINT8 node)
|
||||||
SV_SendRefuse(node, M_GetText("The server is not accepting\njoins for the moment"));
|
SV_SendRefuse(node, M_GetText("The server is not accepting\njoins for the moment"));
|
||||||
else if (D_NumPlayers() >= cv_maxplayers.value)
|
else if (D_NumPlayers() >= cv_maxplayers.value)
|
||||||
SV_SendRefuse(node, va(M_GetText("Maximum players reached: %d"), cv_maxplayers.value));
|
SV_SendRefuse(node, va(M_GetText("Maximum players reached: %d"), cv_maxplayers.value));
|
||||||
|
else if (netgame && D_NumPlayers() + netbuffer->u.clientcfg.localplayers > cv_maxplayers.value)
|
||||||
|
SV_SendRefuse(node, va(M_GetText("Number of local players\nwould exceed maximum: %d"), cv_maxplayers.value));
|
||||||
else if (netgame && netbuffer->u.clientcfg.localplayers > 4) // Hacked client?
|
else if (netgame && netbuffer->u.clientcfg.localplayers > 4) // Hacked client?
|
||||||
SV_SendRefuse(node, M_GetText("Too many players from\nthis node."));
|
SV_SendRefuse(node, M_GetText("Too many players from\nthis node."));
|
||||||
else if (netgame && !netbuffer->u.clientcfg.localplayers) // Stealth join?
|
else if (netgame && !netbuffer->u.clientcfg.localplayers) // Stealth join?
|
||||||
|
|
Loading…
Reference in a new issue