From ae71384013a86eca44f29f3d8996d5b1f30c2a6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1kup=20I=2E=20Hansen?= Date: Wed, 5 Aug 2020 21:12:42 +0100 Subject: [PATCH] Add trim to ProcessWhisper to better match keyword --- AutoInvite.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AutoInvite.lua b/AutoInvite.lua index 8f3383f..bdb5127 100644 --- a/AutoInvite.lua +++ b/AutoInvite.lua @@ -33,7 +33,7 @@ function AutoInvite:ProcessWhisper(text, playerName) return end - if text == AutoInviteSettings.AutoInviteKeyword then + if text:gsub("^%s*(.-)%s*$", "%1") == AutoInviteSettings.AutoInviteKeyword then InviteUnit(playerName) end end