Skip to content

Commit

Permalink
Add admin command which says who the administator is for the server.
Browse files Browse the repository at this point in the history
  • Loading branch information
Splizard authored and est31 committed Feb 4, 2016
1 parent c4e0d95 commit 0e75eb4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions builtin/game/chatcommands.lua
Expand Up @@ -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>]",
Expand Down

0 comments on commit 0e75eb4

Please sign in to comment.