From 18af3ff237b7cbcbfc121e96a6fa010eac9f34f5 Mon Sep 17 00:00:00 2001 From: Egor Date: Sun, 18 Aug 2024 00:27:05 +0300 Subject: [PATCH] spam.lua: lowercase the string before checking --- lua/spam.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/spam.lua b/lua/spam.lua index 9bb0784..bac32e9 100644 --- a/lua/spam.lua +++ b/lua/spam.lua @@ -3,7 +3,7 @@ if not spamlevel then spamlevel = 0 end local function ascii(txt) - txt = txt:gsub("[^ -~]", "") + txt = txt:gsub("[^ -~]", ""):lower() return txt end function setspamlevel(newlevel) @@ -14,7 +14,7 @@ function setspamlevel(newlevel) end txt = ascii(txt) if not chan.v[cl1.key] and not chan.o[cl1.key] and - (txt:find("irc.supernets.org", 1, true) or txt:find("IRC.SUPERNETS.ORG", 1, true)) then + txt:find("irc.supernets.org", 1, true) then return -1 end end) @@ -24,7 +24,7 @@ function setspamlevel(newlevel) end txt = ascii(txt) if not chan.v[cl1.key] and not chan.o[cl1.key] and - (txt:find("hardchats.com", 1, true) or txt:find("HARDCHAT", 1, true)) then + (txt:find("hardchats.com", 1, true) or txt:find("hardchat", 1, true)) then return -1 end end) -- 2.56.0