diff options
author | Mattes D <github@xoft.cz> | 2014-12-07 18:15:23 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-12-07 18:15:23 +0100 |
commit | 8ad1afcc1b98c03bd77b0d85236643ba04795d38 (patch) | |
tree | e340889a2d505f10fd45a80f7b951f3165d6294a /MCServer/Plugins/InfoDump.lua | |
parent | cEvent: Changed chrono duration resolution. (diff) | |
parent | Fixed format warning. (diff) | |
download | cuberite-8ad1afcc1b98c03bd77b0d85236643ba04795d38.tar cuberite-8ad1afcc1b98c03bd77b0d85236643ba04795d38.tar.gz cuberite-8ad1afcc1b98c03bd77b0d85236643ba04795d38.tar.bz2 cuberite-8ad1afcc1b98c03bd77b0d85236643ba04795d38.tar.lz cuberite-8ad1afcc1b98c03bd77b0d85236643ba04795d38.tar.xz cuberite-8ad1afcc1b98c03bd77b0d85236643ba04795d38.tar.zst cuberite-8ad1afcc1b98c03bd77b0d85236643ba04795d38.zip |
Diffstat (limited to '')
-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: |