From 5e8630649e058da7464156b9d3de810d1a6c4269 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sat, 4 Apr 2015 13:38:35 +0200 Subject: Fixed DumpInfo plugin --- MCServer/Plugins/DumpInfo/Init.lua | 13 +++++++------ MCServer/Plugins/InfoDump.lua | 7 +++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/MCServer/Plugins/DumpInfo/Init.lua b/MCServer/Plugins/DumpInfo/Init.lua index 5d9c752b0..1faa8d60f 100644 --- a/MCServer/Plugins/DumpInfo/Init.lua +++ b/MCServer/Plugins/DumpInfo/Init.lua @@ -28,17 +28,18 @@ function HandleDumpPluginRequest(a_Request) Content = Content .. [[ -]] + + + ]] -- 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 .. "" - Content = Content .. "" - Content = Content .. "" + Content = Content .. "\n\n" + Content = Content .. "\t\n" + Content = Content .. "\t\n" + Content = Content .. "\n" end end diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua index 07a534b88..ab4dfd861 100644 --- a/MCServer/Plugins/InfoDump.lua +++ b/MCServer/Plugins/InfoDump.lua @@ -18,6 +18,13 @@ only that one plugin's documentation. This mode of operation doesn't require Lua +-- If this file is called using the loadfile function the arg variable isn't filled. We have to do it manualy then. +local arg = arg or {...} + + + + + -- Check Lua version. We use 5.1-specific construct when loading the plugin info, 5.2 is not compatible! if (_VERSION ~= "Lua 5.1") then print("Unsupported Lua version. This script requires Lua version 5.1, this Lua is version " .. (_VERSION or "")) -- cgit v1.2.3
DumpInfo
DumpInfo
" .. PluginName .. "
" - Content = Content .. "
" .. PluginName .. "