diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/game/privileges.lua | 5 | ||||
-rw-r--r-- | builtin/game/register.lua | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/builtin/game/privileges.lua b/builtin/game/privileges.lua index fb53423eb..e9b2df54c 100644 --- a/builtin/game/privileges.lua +++ b/builtin/game/privileges.lua @@ -86,3 +86,8 @@ core.register_privilege("debug", { description = "Allows enabling various debug options that may affect gameplay", give_to_singleplayer = false, }) + +core.register_can_bypass_userlimit(function(name, ip) + local privs = core.get_player_privs(name) + return privs["server"] or privs["ban"] or privs["privs"] or privs["password"] +end) diff --git a/builtin/game/register.lua b/builtin/game/register.lua index 1f355c7e5..e0073fc03 100644 --- a/builtin/game/register.lua +++ b/builtin/game/register.lua @@ -581,6 +581,7 @@ core.registered_on_item_eats, core.register_on_item_eat = make_registration() core.registered_on_punchplayers, core.register_on_punchplayer = make_registration() core.registered_on_priv_grant, core.register_on_priv_grant = make_registration() core.registered_on_priv_revoke, core.register_on_priv_revoke = make_registration() +core.registered_can_bypass_userlimit, core.register_can_bypass_userlimit = make_registration() -- -- Compatibility for on_mapgen_init() |