diff options
author | Diego MartÃnez <kaeza@users.noreply.github.com> | 2017-02-17 02:30:30 -0300 |
---|---|---|
committer | Diego MartÃnez <kaeza@users.noreply.github.com> | 2017-02-17 02:30:30 -0300 |
commit | 89303b4a01e59157e813ee44e2a85b6e5ed02a03 (patch) | |
tree | e345ab70a10a7cd3a0f6025827287716aa93798a /init.lua | |
parent | 97fb251ad954a5927a4ba59e72cffd277e6d244c (diff) |
Add `.luacheckrc` and fix warnings.
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -24,9 +24,7 @@ local function make_logger(level) end local ACTION = make_logger("action") -local INFO = make_logger("info") local WARNING = make_logger("warning") -local ERROR = make_logger("error") local unit_to_secs = { s = 1, m = 60, h = 3600, @@ -299,11 +297,11 @@ minetest.register_chatcommand("xban_wl", { local cmd, plname = params:match("%s*(%S+)%s*(%S+)") if cmd == "add" then xban.add_whitelist(plname, name) - ACTION("%s adds %s to whitelist", source, plname) + ACTION("%s adds %s to whitelist", name, plname) return true, "Added to whitelist: "..plname elseif cmd == "del" then xban.remove_whitelist(plname) - ACTION("%s removes %s to whitelist", source, plname) + ACTION("%s removes %s to whitelist", name, plname) return true, "Removed from whitelist: "..plname elseif cmd == "get" then local e = xban.get_whitelist(plname) @@ -361,10 +359,10 @@ local function load_db() WARNING("Unable to load database: %s", "Read failed") return end - local t, e = minetest.deserialize(cont) + local t, e2 = minetest.deserialize(cont) if not t then WARNING("Unable to load database: %s", - "Deserialization failed: "..(e or "unknown error")) + "Deserialization failed: "..(e2 or "unknown error")) return end db = t |