From 397f692d4aca5ba339708255d1fbd4f8ec791ba7 Mon Sep 17 00:00:00 2001 From: Egor Date: Sun, 18 Aug 2024 02:11:08 +0300 Subject: [PATCH] spam.lua: fix iteration --- lua/spam.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/spam.lua b/lua/spam.lua index 07a757f..0f4adb7 100644 --- a/lua/spam.lua +++ b/lua/spam.lua @@ -13,7 +13,7 @@ hook_add("sendtochannel", "spam_simple_filter", function(hook, cl1, cl2, chan, t return 0 end txt = ascii(txt) - for k, _ in simple_filters do + for k, _ in pairs(simple_filters) do if txt:find(k, 1, true) then return -1 end @@ -25,7 +25,7 @@ hook_add("sendtoclient", "spam_simple_pm_filter", function(hook, cl1, cl2, chan, return 0 end txt = ascii(txt) - for k, _ in simple_filters do + for k, _ in pairs(simple_filters) do if txt:find(k, 1, true) then return -1 end -- 2.56.0