summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/DumpInfo
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2015-05-28 22:12:12 +0200
committerSTRWarrior <niels.breuker@hotmail.nl>2015-05-28 22:12:12 +0200
commite7214dff656a7b8b3f71d585ea2a0dd6afeba0d6 (patch)
tree587ab4657763aa5b9c88ee07d6c6e03decc899d6 /MCServer/Plugins/DumpInfo
parentMerge pull request #2154 from SafwatHalaby/skeleton (diff)
downloadcuberite-e7214dff656a7b8b3f71d585ea2a0dd6afeba0d6.tar
cuberite-e7214dff656a7b8b3f71d585ea2a0dd6afeba0d6.tar.gz
cuberite-e7214dff656a7b8b3f71d585ea2a0dd6afeba0d6.tar.bz2
cuberite-e7214dff656a7b8b3f71d585ea2a0dd6afeba0d6.tar.lz
cuberite-e7214dff656a7b8b3f71d585ea2a0dd6afeba0d6.tar.xz
cuberite-e7214dff656a7b8b3f71d585ea2a0dd6afeba0d6.tar.zst
cuberite-e7214dff656a7b8b3f71d585ea2a0dd6afeba0d6.zip
Diffstat (limited to 'MCServer/Plugins/DumpInfo')
-rw-r--r--MCServer/Plugins/DumpInfo/Init.lua18
1 files changed, 10 insertions, 8 deletions
diff --git a/MCServer/Plugins/DumpInfo/Init.lua b/MCServer/Plugins/DumpInfo/Init.lua
index 1faa8d60f..2c5998e36 100644
--- a/MCServer/Plugins/DumpInfo/Init.lua
+++ b/MCServer/Plugins/DumpInfo/Init.lua
@@ -33,15 +33,17 @@ function HandleDumpPluginRequest(a_Request)
</tr>]]
-- Loop through each plugin that is found.
- for PluginName, k in pairs(cPluginManager:Get():GetAllPlugins()) do
- -- Check if there is a file called 'Info.lua' or 'info.lua'
- if (cFile:Exists("Plugins/" .. PluginName .. "/Info.lua")) then
- Content = Content .. "\n<tr>\n"
- Content = Content .. "\t<td>" .. PluginName .. "</td>\n"
- Content = Content .. "\t<td><form method='POST'> <input type='hidden' value='" .. PluginName .. "' name='DumpInfo'> <input type='submit' value='DumpInfo'></form></td>\n"
- Content = Content .. "</tr>\n"
+ cPluginManager:Get():ForEachPlugin(
+ function(a_Plugin)
+ -- Check if there is a file called 'Info.lua'
+ if (cFile:Exists("Plugins/" .. a_Plugin:GetName() .. "/Info.lua")) then
+ Content = Content .. "\n<tr>\n"
+ Content = Content .. "\t<td>" .. a_Plugin:GetName() .. "</td>\n"
+ Content = Content .. "\t<td><form method='POST'> <input type='hidden' value='" .. a_Plugin:GetName() .. "' name='DumpInfo'> <input type='submit' value='DumpInfo'></form></td>\n"
+ Content = Content .. "</tr>\n"
+ end
end
- end
+ )
Content = Content .. [[
</table>]]