1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Implement minetest.register_can_bypass_userlimit (#6369)

* Implement minetest.register_on_userlimit_check

This new callback permits to bypass the max_users parameter with new mods condition, based on player name or IP
Only one mod needs to permit it.

Move core part for builtin privileges checks to builtin
This commit is contained in:
Loïc Blot 2017-09-04 22:08:59 +02:00 committed by GitHub
parent c05228fa6d
commit 40dd03e328
6 changed files with 28 additions and 6 deletions

View file

@ -35,6 +35,7 @@ public:
bool on_respawnplayer(ServerActiveObject *player);
bool on_prejoinplayer(const std::string &name, const std::string &ip,
std::string *reason);
bool can_bypass_userlimit(const std::string &name, const std::string &ip);
void on_joinplayer(ServerActiveObject *player);
void on_leaveplayer(ServerActiveObject *player, bool timeout);
void on_cheat(ServerActiveObject *player, const std::string &cheat_type);