From 6076d4b17959767dbb6845540ba082d2b1640c76 Mon Sep 17 00:00:00 2001 From: tommy aka doge <59783653+dowoge@users.noreply.github.com> Date: Sun, 11 Sep 2022 21:35:00 -0400 Subject: [PATCH] ultra mega special case (lua string matching fuckery) --- src/modules/commands/maps_init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/commands/maps_init.lua b/src/modules/commands/maps_init.lua index 2bd6c89..a882134 100644 --- a/src/modules/commands/maps_init.lua +++ b/src/modules/commands/maps_init.lua @@ -49,8 +49,7 @@ for _, game in next, API.GAMES do if type(k)=='string' then for i = 1, self.count do local v = self[i] - - if type(v) == 'table' and v.DisplayName:lower():find(tostring(k):lower()) then + if type(v) == 'table' and v.DisplayName:lower():find(tostring(k:gsub('%%', '%%%%'):gsub('^%^', '%%^'):gsub('%$$', '%%$'):gsub('%(', '%%('):gsub('%)', '%%)'):gsub('%.', '%%.'):gsub('%[', '%%['):gsub('%]', '%%]'):gsub('%*', '%%*'):gsub('%+', '%%+'):gsub('%-', '%%-'):gsub('%?', '%%?')):lower()) then return v end end