diff options
author | Mattes D <github@xoft.cz> | 2015-09-06 10:05:18 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-09-06 10:05:18 +0200 |
commit | 7da79fdc19a9825b29cda58a698da1fa3cfb8e57 (patch) | |
tree | ec17a9703fe734956e4f151cb5306befc4fd7571 /MCServer/Plugins/DumpInfo | |
parent | Merge pull request #2459 from cuberite/fixes (diff) | |
parent | Renamed output directory to Server (diff) | |
download | cuberite-7da79fdc19a9825b29cda58a698da1fa3cfb8e57.tar cuberite-7da79fdc19a9825b29cda58a698da1fa3cfb8e57.tar.gz cuberite-7da79fdc19a9825b29cda58a698da1fa3cfb8e57.tar.bz2 cuberite-7da79fdc19a9825b29cda58a698da1fa3cfb8e57.tar.lz cuberite-7da79fdc19a9825b29cda58a698da1fa3cfb8e57.tar.xz cuberite-7da79fdc19a9825b29cda58a698da1fa3cfb8e57.tar.zst cuberite-7da79fdc19a9825b29cda58a698da1fa3cfb8e57.zip |
Diffstat (limited to 'MCServer/Plugins/DumpInfo')
-rw-r--r-- | MCServer/Plugins/DumpInfo/Init.lua | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/MCServer/Plugins/DumpInfo/Init.lua b/MCServer/Plugins/DumpInfo/Init.lua deleted file mode 100644 index 2c5998e36..000000000 --- a/MCServer/Plugins/DumpInfo/Init.lua +++ /dev/null @@ -1,52 +0,0 @@ -function Initialize(a_Plugin) - a_Plugin:SetName("DumpInfo") - a_Plugin:SetVersion(1) - - -- Check if the infodump file exists. - if (not cFile:Exists("Plugins/InfoDump.lua")) then - LOGWARN("[DumpInfo] InfoDump.lua was not found.") - return false - end - - -- Add the webtab. - a_Plugin:AddWebTab("DumpPlugin", HandleDumpPluginRequest) - return true -end - - - - - -function HandleDumpPluginRequest(a_Request) - local Content = "" - - -- Check if it already was requested to dump a plugin. - if (a_Request.PostParams["DumpInfo"] ~= nil) then - local F = loadfile("Plugins/InfoDump.lua") - F("Plugins/" .. a_Request.PostParams["DumpInfo"]) - end - - Content = Content .. [[ -<table> - <tr> - <th colspan="2">DumpInfo</th> - </tr>]] - - -- Loop through each plugin that is found. - 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 - ) - - Content = Content .. [[ -</table>]] - - return Content -end |