diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-09-04 22:08:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-04 22:08:59 +0200 |
commit | 40dd03e328ff0ae36338615114cb38879752756e (patch) | |
tree | 0ffe5ded06cce82f2b528284c1b5f5aba73f203e /src/script/cpp_api/s_player.h | |
parent | c05228fa6d446022cdf675865f9a420c95619313 (diff) | |
download | minetest-40dd03e328ff0ae36338615114cb38879752756e.tar.gz minetest-40dd03e328ff0ae36338615114cb38879752756e.tar.bz2 minetest-40dd03e328ff0ae36338615114cb38879752756e.zip |
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
Diffstat (limited to 'src/script/cpp_api/s_player.h')
-rw-r--r-- | src/script/cpp_api/s_player.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_player.h b/src/script/cpp_api/s_player.h index faf394de5..6b752eb69 100644 --- a/src/script/cpp_api/s_player.h +++ b/src/script/cpp_api/s_player.h @@ -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); |