From: Splizard Date: Wed, 3 Feb 2016 06:09:13 +0000 (+1300) Subject: Add admin command which says who the administator is for the server. X-Git-Tag: 0.4.14~289 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0e75eb4324ba71c3d685b2f22a8a36b3aa0c9ef5;p=oweals%2Fminetest.git Add admin command which says who the administator is for the server. --- 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/]",