diff options
Diffstat (limited to 'MCServer/Plugins')
-rw-r--r-- | MCServer/Plugins/Core/web_serversettings.lua | 22 |
1 files changed, 18 insertions, 4 deletions
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 [[<select name="]] .. name .. [[">]]
- .. HTML_Option("1", "On", defaultValue == 1 )
- .. HTML_Option("0", "Off", defaultValue == 0 )
- .. [[</select>]]
+ .. HTML_Option("1", "On", defaultValue == 1 )
+ .. HTML_Option("0", "Off", defaultValue == 0 )
+ .. [[</select>]]
+end
+
+local function HTML_Select_Version( name, defaultValue )
+ return [[<select name="]] .. name .. [[">]]
+ .. HTML_Option("29", "1.2.5", defaultValue == 3 )
+ .. HTML_Option("39", "1.3.2", defaultValue == 2 )
+ .. HTML_Option("47", "1.4.2", defaultValue == 1 )
+ .. HTML_Option("49", "1.4.5", defaultValue == 0 )
+ .. [[</select>]]
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 ) <td><input type="text" name="Server_MaxPlayers" value="]] .. SettingsIni:GetValue("Server", "MaxPlayers") .. [["></td></tr>
<tr><td>Port:</td>
<td><input type="text" name="Server_Port" value="]] .. SettingsIni:GetValue("Server", "Port") .. [["></td></tr>
+ <tr><td>Shown Version:</td>
+ <td>]] .. HTML_Select_Version("Server_Version", SettingsIni:GetValueI("Server", "PrimaryServerVersion") ) .. [[</td></tr>
</table><br>
<table>
|