Adjust location of name filtering

Sasky [07-02-15 - 05:03]
Adjust location of name filtering
Filename
AutoInvite.lua
lua/queue.lua
diff --git a/AutoInvite.lua b/AutoInvite.lua
index 0054fb7..57ec669 100644
--- a/AutoInvite.lua
+++ b/AutoInvite.lua
@@ -38,7 +38,6 @@ end

 --Main callback fired on chat message
 AutoInvite.callback = function(_, messageType, from, message)
-    from = from:gsub("%^.+", "")
 	if not AutoInvite.enabled or not AutoInvite.listening then
 		return
 	end
diff --git a/lua/queue.lua b/lua/queue.lua
index 27f8b50..ec0d1dc 100644
--- a/lua/queue.lua
+++ b/lua/queue.lua
@@ -162,6 +162,7 @@ end

 --Interface to queue
 function AutoInvite:invitePlayer(name)
+    name = name:gsub("%^.+", "")
     if name ~= self.player then
         queue:push(name)
     end