diff --git a/.luacheckrc b/.luacheckrc index fada0ab..6d9e8bc 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -5,7 +5,8 @@ globals = { read_globals = { -- Stdlib string = {fields = {"split"}}, - table = {fields = {"copy", "getn"}}, + table = {fields = {"copy", "getn", "indexof"}}, + beerchat = {fields = {"has_player_muted_player", "execute_callbacks"}}, -- Minetest "minetest", diff --git a/util/spam.lua b/util/spam.lua index e29ef4e..dd8913a 100644 --- a/util/spam.lua +++ b/util/spam.lua @@ -28,7 +28,7 @@ local function words_ratio(str, ratio) end function mail.check_spam(message) - spam_checks = {} + local spam_checks = {} if caps_ratio(message.subject) == 1 or caps_ratio(message.body) > 0.4 then table.insert(spam_checks, "caps") end