Bugfixes

Sasky [07-02-15 - 04:52]
Bugfixes

- Trim player names
- Fix UI refresh function
Filename
AutoInvite.lua
AutoInvite.txt
AutoInviteUI.lua
diff --git a/AutoInvite.lua b/AutoInvite.lua
index 8d88991..0054fb7 100644
--- a/AutoInvite.lua
+++ b/AutoInvite.lua
@@ -38,6 +38,7 @@ 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
@@ -57,7 +58,6 @@ AutoInvite.callback = function(_, messageType, from, message)
         echo(zo_strformat(GetString(SI_AUTO_INVITE_SEND_TO_USER),from))
         AutoInvite:invitePlayer(from)
 	end
-
 	--d("Checking message '" .. string.lower(message) .."' ?= '" .. AutoInvite.cfg.watchStr .."'")
 end

diff --git a/AutoInvite.txt b/AutoInvite.txt
index 82a6f22..5c2f82b 100644
--- a/AutoInvite.txt
+++ b/AutoInvite.txt
@@ -1,6 +1,6 @@
 ## APIVersion: 100011
 ## Title: AutoInvite
-## Version: 2.1.1
+## Version: 2.1.2
 ## Author: Sasky
 ## SavedVariables: AutoInviteSettings
 ## OptionalDependsOn: LibAddonMenu-2.0
diff --git a/AutoInviteUI.lua b/AutoInviteUI.lua
index 089428c..d487565 100644
--- a/AutoInviteUI.lua
+++ b/AutoInviteUI.lua
@@ -19,11 +19,13 @@ AutoInviteUI = AutoInviteUI or {}
 local ui = AutoInviteUI

 function AutoInviteUI.refresh()
-    ui.enabled:UpdateValue()
-    ui.cyr:UpdateValue()
-    ui.restart:UpdateValue()
-    ui.max:UpdateValue()
-    ui.text:UpdateValue()
+    ui.fragmentEnabled.enabled:UpdateValue()
+    ui.fragmentEnabled.text:UpdateValue()
+    ui.fragmentOptions.cyr:UpdateValue()
+    ui.fragmentOptions.restart:UpdateValue()
+    ui.fragmentOptions.kick:UpdateValue()
+    ui.fragmentOptions.kickTime:UpdateValue()
+    ui.fragmentOptions.max:UpdateValue()
 end

 function AutoInviteUI.init()