summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/InfoReg.lua
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-05-07 12:54:58 +0200
committerHowaner <franzi.moos@googlemail.com>2014-05-07 12:54:58 +0200
commitf5fe3682201e2f1356e3a5c408eb8296b542e072 (patch)
tree208ec7a760b9e909fbb43e1a12ee43d866cb9df7 /MCServer/Plugins/InfoReg.lua
parentRemove old import (diff)
parentFixed wires powering wires diagonally below them (diff)
downloadcuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar
cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar.gz
cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar.bz2
cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar.lz
cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar.xz
cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.tar.zst
cuberite-f5fe3682201e2f1356e3a5c408eb8296b542e072.zip
Diffstat (limited to 'MCServer/Plugins/InfoReg.lua')
-rw-r--r--MCServer/Plugins/InfoReg.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/MCServer/Plugins/InfoReg.lua b/MCServer/Plugins/InfoReg.lua
index 27e63aa5b..da5a9972c 100644
--- a/MCServer/Plugins/InfoReg.lua
+++ b/MCServer/Plugins/InfoReg.lua
@@ -16,22 +16,22 @@ local function ListSubcommands(a_Player, a_Subcommands, a_CmdString)
end
-- Enum all the subcommands:
- local Verbs = {};
+ local Verbs = {}
for cmd, info in pairs(a_Subcommands) do
- if (a_Player:HasPermission(info.Permission or "")) then
- table.insert(Verbs, " " .. a_CmdString .. " " .. cmd);
+ if ((a_Player == nil) or (a_Player:HasPermission(info.Permission or ""))) then
+ table.insert(Verbs, a_CmdString .. " " .. cmd)
end
end
- table.sort(Verbs);
+ table.sort(Verbs)
-- Send the list:
if (a_Player == nil) then
for idx, verb in ipairs(Verbs) do
- LOGINFO(verb);
+ LOGINFO(" " .. verb)
end
else
for idx, verb in ipairs(Verbs) do
- a_Player:SendMessage(verb);
+ a_Player:SendMessage(cCompositeChat(" ", mtInfo):AddSuggestCommandPart(verb, verb))
end
end
end