Page 1 of 1
[Question]How to identify the admin with a server w/ command

Posted:
Fri Jul 29, 2016 22:55
by MineYoshi
I wanna mean, if you type /help_admin, and you are the admin you get by example a golden pickaxe
But if you aren't you get a message likely: "You aren't the admin!"...
How do i do this?
Re: [Question]How to identify the admin with a server w/ com

Posted:
Fri Jul 29, 2016 22:58
by lisacvuk
lol, make a priv 'admin', and grant it to administrators.
Re: [Question]How to identify the admin with a server w/ com

Posted:
Fri Jul 29, 2016 23:01
by rubenwardy
Type /admin to see the owner of the server.
Do not create a priv called admin, that is an abuse of the privilege system. Privileges should give you the right or permission to do something, not indicate your role or class
Re: [Question]How to identify the admin with a server w/ com

Posted:
Fri Jul 29, 2016 23:05
by MineYoshi
...
I noticed that there is a "server" priv...
What i want to do is that only someone with "server" priv can use a command likely "/admin_center"..
Re: [Question]How to identify the admin with a server w/ com

Posted:
Fri Jul 29, 2016 23:08
by rubenwardy
You should make a new priv, say admintool. That priv should allow you to use the admin pickaxe you create
Re: [Question]How to identify the admin with a server w/ com

Posted:
Fri Jul 29, 2016 23:08
by lisacvuk
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_chatcommand("admin_center", {
description = "Testing...",
privs = {server = true},
func = function(name)
minetest.chat_send_all("COOKIES!")
})
Re: [Question]How to identify the admin with a server w/ com

Posted:
Fri Jul 29, 2016 23:10
by MineYoshi
thanks for the help!
Re: [Question]How to identify the admin with a server w/ com

Posted:
Fri Jul 29, 2016 23:12
by lisacvuk
np lol, just open Minetest Game/mods/sethome/init.lua