diff options
Diffstat (limited to 'Plugins/Core')
-rw-r--r-- | Plugins/Core/web_playerlist.lua | 4 | ||||
-rw-r--r-- | Plugins/Core/web_reload.lua | 2 | ||||
-rw-r--r-- | Plugins/Core/web_whitelist.lua | 16 |
3 files changed, 11 insertions, 11 deletions
diff --git a/Plugins/Core/web_playerlist.lua b/Plugins/Core/web_playerlist.lua index 205306ba8..6c736ce3c 100644 --- a/Plugins/Core/web_playerlist.lua +++ b/Plugins/Core/web_playerlist.lua @@ -2,8 +2,8 @@ function HandleRequest_PlayerList( Request ) local World = cRoot:Get():GetWorld()
local Content = ""
- if( Request.Params:get("playerlist-kick") ~= "" ) then
- local KickPlayerName = Request.Params:get("playerlist-kick")
+ if( Request.Params["playerlist-kick"] ~= nil ) then
+ local KickPlayerName = Request.Params["playerlist-kick"]
local Player = World:GetPlayer( KickPlayerName )
if( Player == nil ) then
Content = Content .. "<p>Could not find player " .. KickPlayerName .. " !</p>"
diff --git a/Plugins/Core/web_reload.lua b/Plugins/Core/web_reload.lua index 45ed1a40b..3a59ad6b6 100644 --- a/Plugins/Core/web_reload.lua +++ b/Plugins/Core/web_reload.lua @@ -1,7 +1,7 @@ function HandleRequest_Reload( Request )
local Content = ""
- if( Request.PostParams:get("reload") ~= "" ) then
+ if( Request.PostParams["reload"] ~= nil ) then
Content = Content .. "<head><meta http-equiv=\"refresh\" content=\"2;././\"></head>"
Content = Content .. "<p>Reloading plugins... This can take a while depending on the plugins you're using.</p>"
cRoot:Get():GetPluginManager():ReloadPlugins()
diff --git a/Plugins/Core/web_whitelist.lua b/Plugins/Core/web_whitelist.lua index 1a99a9f95..2c9ddb953 100644 --- a/Plugins/Core/web_whitelist.lua +++ b/Plugins/Core/web_whitelist.lua @@ -4,8 +4,8 @@ end function HandleRequest_WhiteList( Request )
local UpdateMessage = ""
- if( Request.PostParams:get("whitelist-add") ~= "" ) then
- local PlayerName = Request.PostParams:get("whitelist-add")
+ if( Request.PostParams["whitelist-add"] ~= nil ) then
+ local PlayerName = Request.PostParams["whitelist-add"]
if( WhiteListIni:GetValueB("WhiteList", PlayerName, false) == true ) then
UpdateMessage = "<b>".. PlayerName.."</b> is already on the whitelist"
@@ -14,18 +14,18 @@ function HandleRequest_WhiteList( Request ) UpdateMessage = "Added <b>" .. PlayerName .. "</b> to whitelist."
WhiteListIni:WriteFile()
end
- elseif( Request.PostParams:get("whitelist-delete") ~= "" ) then
- local PlayerName = Request.PostParams:get("whitelist-delete")
+ elseif( Request.PostParams["whitelist-delete"] ~= nil ) then
+ local PlayerName = Request.PostParams["whitelist-delete"]
WhiteListIni:DeleteValue( "WhiteList", PlayerName )
UpdateMessage = "Removed <b>" .. PlayerName .. "</b> from whitelist."
WhiteListIni:WriteFile()
- elseif( Request.PostParams:get("whitelist-reload") ~= "" ) then
+ elseif( Request.PostParams["whitelist-reload"] ~= nil ) then
WhiteListIni:Erase() -- Empty entire loaded ini first, otherwise weird shit goes down
WhiteListIni:ReadFile()
UpdateMessage = "Loaded from disk"
- elseif( Request.Params:get("whitelist-setenable") ~= "" ) then
- local Enabled = Request.Params:get("whitelist-setenable");
- local CreateNewValue = false;
+ elseif( Request.Params["whitelist-setenable"] ~= nil ) then
+ local Enabled = Request.Params["whitelist-setenable"]
+ local CreateNewValue = false
if( WhiteListIni:FindValue( WhiteListIni:FindKey("WhiteListSettings"), "WhiteListOn" ) == cIniFile.noID ) then -- Find out whether the value is in the ini
CreateNewValue = true
end
|