summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/InfoDump.lua
diff options
context:
space:
mode:
authorp-mcgowan <mickeymcgowan@shaw.ca>2014-12-05 20:24:09 +0100
committerp-mcgowan <mickeymcgowan@shaw.ca>2014-12-05 20:24:09 +0100
commita8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d (patch)
tree8c1fa6af38d8997f0cc935b62362245373b5db86 /MCServer/Plugins/InfoDump.lua
parentreformat (diff)
parentCheckBasicStyle: Check missing braces for control statements. (diff)
downloadcuberite-a8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d.tar
cuberite-a8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d.tar.gz
cuberite-a8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d.tar.bz2
cuberite-a8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d.tar.lz
cuberite-a8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d.tar.xz
cuberite-a8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d.tar.zst
cuberite-a8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d.zip
Diffstat (limited to 'MCServer/Plugins/InfoDump.lua')
-rw-r--r--MCServer/Plugins/InfoDump.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua
index de1d1f451..07a534b88 100644
--- a/MCServer/Plugins/InfoDump.lua
+++ b/MCServer/Plugins/InfoDump.lua
@@ -444,7 +444,18 @@ local function BuildPermissions(a_PluginInfo)
Permissions[info.Permission] = Permission
-- Add the command to the list of commands using this permission:
Permission.CommandsAffected = Permission.CommandsAffected or {}
- table.insert(Permission.CommandsAffected, CommandString)
+ -- First, make sure that we don't already have this command in the list,
+ -- it may have already been present in a_PluginInfo
+ local NewCommand = true
+ for _, existCmd in ipairs(Permission.CommandsAffected) do
+ if CommandString == existCmd then
+ NewCommand = false
+ break
+ end
+ end
+ if NewCommand then
+ table.insert(Permission.CommandsAffected, CommandString)
+ end
end
-- Process the command param combinations for permissions: