reserved_slots_enhanced mod for MineTest
Based on code by rubenwardy posted in:
https://forum.minetest.net/viewtopic.php?f=5&t=10037



What does this mod do?
It allows specific players to always be able to connect just like the privileged players can.


Who wants this mod?
Do you have any favored players that you would like to always be able to join your server regardless of
the number of players already on? Maybe your best bud, sweetheart, or a player with a few extra privs such as a moderator?
If so then this mod is for you.


How to install this mod:
If installed, remove the reserved_slots mod.
Read instructions at: wiki.minetest.com/wiki/installing_Mods
Make sure that the mod's directory name is: reserved_slots_enhanced


How to use it:
Set max_users in the server's conf file to the highest number of players that your server can handle. This includes: normal, favored, privileged, and the admin.
Do one of:
    Set Number_Slots variable in this file to the number of privileged and favored players that you want to let play at all times. This includes the admin.
    Set the reserved_slots variable the same way in the server's conf file to the desired value: 'reserved_slots = ____'
IMPORTANT: Grant the reserved_slot priv to each player that has any of the following privs: server, ban, privs, password.
    You don't have to do that for the admin. The server gives the admin the reserved_slot priv automatically


NOTES:
Tested on a version 0.4.13 server.
Depends on the server setting: max_users
Can depend on reserved_slots being defined in the server's conf file or dynamically in the game.
max_users is always set either by the server's conf file, dynamically in game, or by a default value set by the server.
Requires privileged players to have the reserved_slot priv. This allows this mod to not test for the other privs so that logins are faster.
This mod may cause log in failures (timeouts) on servers with a lot of players
For those who care: Use of this mod may affect your ranking in the minetest server list at servers.minetest.net
Ref: src/network/serverpackethandler.cpp

For more information:
See: forum.minetest.net/viewtopic.php?f=9&t=14799
