diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-12-13 13:11:01 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-12-13 13:11:01 +0100 |
commit | 4b20a615192baeb5ef0a04a10161a03428cda8cd (patch) | |
tree | c6f25102267b0cc4a444f6e746679405948142b0 /MCServer/Plugins/InfoDump.lua | |
parent | Fixed compilation? (diff) | |
parent | Merge pull request #1660 from Seadragon91/master (diff) | |
download | cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.gz cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.bz2 cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.lz cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.xz cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.zst cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.zip |
Diffstat (limited to 'MCServer/Plugins/InfoDump.lua')
-rw-r--r-- | MCServer/Plugins/InfoDump.lua | 13 |
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: |