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 /importers | |
parent | 97fb251ad954a5927a4ba59e72cffd277e6d244c (diff) | |
download | xban2-89303b4a01e59157e813ee44e2a85b6e5ed02a03.tar.gz xban2-89303b4a01e59157e813ee44e2a85b6e5ed02a03.tar.bz2 xban2-89303b4a01e59157e813ee44e2a85b6e5ed02a03.zip |
Add `.luacheckrc` and fix warnings.
Diffstat (limited to 'importers')
-rw-r--r-- | importers/v2.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/importers/v2.lua b/importers/v2.lua index fd29966..739063f 100644 --- a/importers/v2.lua +++ b/importers/v2.lua @@ -8,19 +8,19 @@ function xban.importers.v2() local text = f:read("*a") f:close() local db = minetest.deserialize(text) - for _, e in ipairs(db) do - for name in pairs(e.names) do + for _, ent in ipairs(db) do + for name in pairs(ent.names) do local entry = xban.find_entry(name, true) if entry.source ~= "xban:importer_v2" then for nm in pairs(e.names) do entry.names[nm] = true end - if e.banned then + if ent.banned then entry.banned = true entry.reason = e.banned entry.source = "xban:importer_v2" - entry.time = e.time - entry.expires = e.expires + entry.time = ent.time + entry.expires = ent.expires table.insert(entry.record, { source = entry.source, reason = entry.reason, |