From ee14344c05cd7e0672adcd734b505fc41baee25b Mon Sep 17 00:00:00 2001 From: William 'psyFi' Hatcher Date: Sun, 13 Aug 2017 06:29:24 -0500 Subject: Update TestLuaRocks.lua (#3903) Changed LOG to LOGWARNING when a library was not found Made log text more descriptive Removed unnecessary semicolons --- Server/Plugins/TestLuaRocks/TestLuaRocks.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'Server') diff --git a/Server/Plugins/TestLuaRocks/TestLuaRocks.lua b/Server/Plugins/TestLuaRocks/TestLuaRocks.lua index a4c2be6f8..44a545032 100644 --- a/Server/Plugins/TestLuaRocks/TestLuaRocks.lua +++ b/Server/Plugins/TestLuaRocks/TestLuaRocks.lua @@ -20,14 +20,14 @@ local http = require("socket.http"); -LOGINFO("Trying to download a webpage..."); -local body, code, headers = http.request('https://forum.cuberite.org/'); -LOG("code: " .. tostring(code)); -LOG("headers: "); +LOGINFO("Trying to download a webpage...") +local body, code, headers = http.request('https://forum.cuberite.org/') +LOG("code: " .. tostring(code)) +LOG("headers: ") for k, v in pairs(headers or {}) do - LOG(" " .. k .. ": " .. v); + LOG(" " .. k .. ": " .. v) end -LOG("body length: " .. string.len(body)); +LOG("body length: " .. string.len(body)) @@ -35,15 +35,15 @@ LOG("body length: " .. string.len(body)); function Initialize(a_Plugin) if (socket == nil) then - LOG("LuaSocket not found"); + LOGWARNING("LuaSocket not found") else - LOG("LuaSocket loaded"); + LOG("LuaSocket loaded") end if (log30 == nil) then - LOG("30log not found"); + LOGWARNING("30log not found") else - LOG("30log loaded"); + LOG("30log loaded") end - LOGINFO("Preventing plugin load so that it may be requested again from the webadmin."); - return false; + LOGINFO("Reload plugin from console or webadmin to rerun tests.") + return false end -- cgit v1.2.3