Skip to content

Commit

Permalink
Merge pull request #3 from jakupih/add_trim
Browse files Browse the repository at this point in the history
Add trim to ProcessWhisper to better match keyword
  • Loading branch information
Cjewett authored Aug 8, 2020
2 parents c759eb3 + ae71384 commit 9093e0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AutoInvite.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9093e0d

Please sign in to comment.