summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-12-06 18:41:48 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-12-06 18:41:48 +0100
commit3acdf25b058bceef3005eead6e909c27c7a9e4a8 (patch)
tree38c40774061bd44b3452091092a018c53459907b /MCServer
parentTools: Removed unused Timer.* file from CMakeLists.txt. (diff)
parentMerge pull request #1647 from mc-server/SocketThreadsFix (diff)
downloadcuberite-3acdf25b058bceef3005eead6e909c27c7a9e4a8.tar
cuberite-3acdf25b058bceef3005eead6e909c27c7a9e4a8.tar.gz
cuberite-3acdf25b058bceef3005eead6e909c27c7a9e4a8.tar.bz2
cuberite-3acdf25b058bceef3005eead6e909c27c7a9e4a8.tar.lz
cuberite-3acdf25b058bceef3005eead6e909c27c7a9e4a8.tar.xz
cuberite-3acdf25b058bceef3005eead6e909c27c7a9e4a8.tar.zst
cuberite-3acdf25b058bceef3005eead6e909c27c7a9e4a8.zip
Diffstat (limited to 'MCServer')
-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: