diff options
author | Splizard <Splizard@katistuff.co.nz> | 2016-02-03 19:09:13 +1300 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2016-02-04 13:23:02 +0100 |
commit | 0e75eb4324ba71c3d685b2f22a8a36b3aa0c9ef5 (patch) | |
tree | d01e16028b478e5ec3c493dd1574c0deecff64d6 | |
parent | c4e0d95c87a3aec22ad52ae427b704a9f3a22d21 (diff) | |
download | minetest-0e75eb4324ba71c3d685b2f22a8a36b3aa0c9ef5.tar.gz minetest-0e75eb4324ba71c3d685b2f22a8a36b3aa0c9ef5.tar.bz2 minetest-0e75eb4324ba71c3d685b2f22a8a36b3aa0c9ef5.zip |
Add admin command which says who the administator is for the server.
-rw-r--r-- | builtin/game/chatcommands.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/builtin/game/chatcommands.lua b/builtin/game/chatcommands.lua index 6a35c034e..fff893b28 100644 --- a/builtin/game/chatcommands.lua +++ b/builtin/game/chatcommands.lua @@ -84,6 +84,18 @@ core.register_chatcommand("me", { end, }) +core.register_chatcommand("admin", { + description = "Show the name of the server owner", + func = function(name) + local admin = minetest.setting_get("name") + if admin then + return true, "The administrator of this server is "..admin.."." + else + return false, "There's no administrator named in the config file." + end + end, +}) + core.register_chatcommand("help", { privs = {}, params = "[all/privs/<cmd>]", |