From 65aa72a2c30d082c3d57370c619c5c59354084fb Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 21 Dec 2012 11:13:43 +0000 Subject: Added PrimaryServerVersion to the webadmin (patch contributed by STR_Warrior) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1088 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- MCServer/Plugins/Core/web_serversettings.lua | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/Core/web_serversettings.lua b/MCServer/Plugins/Core/web_serversettings.lua index 63b5aab47..c4b41e685 100644 --- a/MCServer/Plugins/Core/web_serversettings.lua +++ b/MCServer/Plugins/Core/web_serversettings.lua @@ -9,9 +9,18 @@ end local function HTML_Select_On_Off( name, defaultValue ) return [[]] + .. HTML_Option("1", "On", defaultValue == 1 ) + .. HTML_Option("0", "Off", defaultValue == 0 ) + .. [[]] +end + +local function HTML_Select_Version( name, defaultValue ) + return [[]] end @@ -31,7 +40,10 @@ local function ShowGeneralSettings( Request ) SettingsIni:SetValue("Server", "MaxPlayers", Request.PostParams["Server_MaxPlayers"], false ) end if( tonumber( Request.PostParams["Server_Port"] ) ~= nil ) then - SettingsIni:SetValue("Server", "Port", Request.PostParams["Server_Port"], false ) + SettingsIni:SetValue("Server", "Port", Request.PostParams["Server_Port"], false ) + end + if( tonumber( Request.PostParams["Server_Version"] ) ~= nil ) then + SettingsIni:SetValue("Server", "PrimaryServerVersion", Request.PostParams["Server_Version"], false ) end if( tonumber( Request.PostParams["Authentication_Authenticate"] ) ~= nil ) then SettingsIni:SetValue("Authentication", "Authenticate", Request.PostParams["Authentication_Authenticate"], false ) @@ -60,6 +72,8 @@ local function ShowGeneralSettings( Request ) Port: + Shown Version: + ]] .. HTML_Select_Version("Server_Version", SettingsIni:GetValueI("Server", "PrimaryServerVersion") ) .. [[
-- cgit v1.2.3