From: Egor Date: Sat, 17 Aug 2024 23:11:08 +0000 (+0300) Subject: spam.lua: fix iteration X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=397f692d4aca5ba339708255d1fbd4f8ec791ba7;p=patchyircd.git spam.lua: fix iteration --- 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