Fix luacheck
Fix luacheck warnings in spam.lua Fix global variable initialization (was needed only locally) Add beerchat to luacheck
This commit is contained in:
parent
103c4ae441
commit
c5fd218415
@ -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",
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user