Free some admin commands.
Idea taken from sparky's server.
This commit is contained in:
parent
a9d8b58223
commit
6455736ad8
@ -120,13 +120,14 @@ end
|
||||
local init_commands
|
||||
init_commands = function()
|
||||
|
||||
if factions_config.faction_user_priv then
|
||||
minetest.register_privilege("faction_user",
|
||||
{
|
||||
description = "this user is allowed to interact with faction mod",
|
||||
give_to_singleplayer = true,
|
||||
}
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
minetest.register_privilege("faction_admin",
|
||||
{
|
||||
@ -1028,7 +1029,7 @@ factions.register_command("getspawn", {
|
||||
factions.register_command("whoin", {
|
||||
description = "Get all members of a faction.",
|
||||
infaction = false,
|
||||
global_privileges = {"faction_admin"},
|
||||
global_privileges = def_global_privileges,
|
||||
format = {"faction"},
|
||||
on_success = function(player, faction, pos, parcelpos, args)
|
||||
local msg = {}
|
||||
@ -1043,7 +1044,7 @@ factions.register_command("whoin", {
|
||||
factions.register_command("stats", {
|
||||
description = "Get stats of a faction.",
|
||||
infaction = false,
|
||||
global_privileges = {"faction_admin"},
|
||||
global_privileges = def_global_privileges,
|
||||
format = {"faction"},
|
||||
on_success = function(player, faction, pos, parcelpos, args)
|
||||
local f = args.factions[1]
|
||||
@ -1055,7 +1056,7 @@ factions.register_command("stats", {
|
||||
factions.register_command("seen", {
|
||||
description = "Check the last time a faction had a member logged in",
|
||||
infaction = false,
|
||||
global_privileges = {"faction_admin"},
|
||||
global_privileges = def_global_privileges,
|
||||
format = {"faction"},
|
||||
on_success = function(player, faction, pos, parcelpos, args)
|
||||
local lastseen = args.factions[1].last_logon
|
||||
|
Loading…
Reference in New Issue
Block a user