summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornielsbreu@gmail.com <nielsbreu@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-17 16:34:51 +0200
committernielsbreu@gmail.com <nielsbreu@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-17 16:34:51 +0200
commit1e4aaa774a93f8d9e2947b1259ba9670e0dc18cb (patch)
tree2737f4b8380b62cc4845de2053c2c84d92be5824
parentRemoved pickup logging (diff)
downloadcuberite-1e4aaa774a93f8d9e2947b1259ba9670e0dc18cb.tar
cuberite-1e4aaa774a93f8d9e2947b1259ba9670e0dc18cb.tar.gz
cuberite-1e4aaa774a93f8d9e2947b1259ba9670e0dc18cb.tar.bz2
cuberite-1e4aaa774a93f8d9e2947b1259ba9670e0dc18cb.tar.lz
cuberite-1e4aaa774a93f8d9e2947b1259ba9670e0dc18cb.tar.xz
cuberite-1e4aaa774a93f8d9e2947b1259ba9670e0dc18cb.tar.zst
cuberite-1e4aaa774a93f8d9e2947b1259ba9670e0dc18cb.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/Core/web_manageplugins.lua22
1 files changed, 18 insertions, 4 deletions
diff --git a/MCServer/Plugins/Core/web_manageplugins.lua b/MCServer/Plugins/Core/web_manageplugins.lua
index cd785ec53..bf1f04ff5 100644
--- a/MCServer/Plugins/Core/web_manageplugins.lua
+++ b/MCServer/Plugins/Core/web_manageplugins.lua
@@ -122,13 +122,27 @@ function HandleRequest_ManagePlugins( Request )
Content = Content .. "<h4>Currently installed plugins</h4>"
Content = Content .. "<table>"
+ ActivePluginsName = {}
+ ActivePluginVersion = {}
+ InactivePlugins = {}
for k, Plugin in pairs(PluginList) do
- Content = Content .. "<tr><td>".. k .."</td>"
- if( Plugin ) then
- Content = Content .. "<td>" .. Plugin:GetName() .. " V. " .. Plugin:GetVersion() .. "</td><td>" .. Button_DisablePlugin(k) .. "</td>"
+ if( Plugin ) then
+ table.insert( ActivePluginsName, k )
+ table.insert( ActivePluginVersion, Plugin:GetVersion() )
else
- Content = Content .. "<td></td><td>" .. Button_EnablePlugin(k) .. "</td>"
+ table.insert( InactivePlugins, k )
end
+ end
+ table.sort( ActivePluginsName )
+ table.sort( InactivePlugins )
+ for i = 1, #ActivePluginsName do
+ Content = Content .. "<tr><td>".. ActivePluginsName[i] .."</td>"
+ Content = Content .. "<td>" .. ActivePluginsName[i] .. " V. " .. ActivePluginVersion[i] .. "</td><td>" .. Button_DisablePlugin(ActivePluginsName[i]) .. "</td>"
+ Content = Content .. "</tr>"
+ end
+ for i = 1, #InactivePlugins do
+ Content = Content .. "<tr><td>".. InactivePlugins[i] .."</td>"
+ Content = Content .. "<td></td><td>" .. Button_EnablePlugin(InactivePlugins[i]) .. "</td>"
Content = Content .. "</tr>"
end
Content = Content .. "</table>"