projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4e0d95
)
Add admin command which says who the administator is for the server.
author
Splizard
<Splizard@katistuff.co.nz>
Wed, 3 Feb 2016 06:09:13 +0000
(19:09 +1300)
committer
est31
<MTest31@outlook.com>
Thu, 4 Feb 2016 12:23:02 +0000
(13:23 +0100)
builtin/game/chatcommands.lua
patch
|
blob
|
history
diff --git
a/builtin/game/chatcommands.lua
b/builtin/game/chatcommands.lua
index 6a35c034e9268036cc23633f26d4b63ae715afd4..fff893b282de1b149e0d6304eb643cb6ac9084a5 100644
(file)
--- 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>]",