fix blacklist warn/kick parameters

Leandro Silva [01-30-20 - 22:20]
fix blacklist warn/kick parameters
Filename
LeoGuildManager.lua
LeoGuildManager.txt
LeoGuildManagerInit.lua
diff --git a/LeoGuildManager.lua b/LeoGuildManager.lua
index b28bbcd..f29edf9 100644
--- a/LeoGuildManager.lua
+++ b/LeoGuildManager.lua
@@ -571,7 +571,7 @@ function LeoGuildManager.Initialize()
     end
 end

-function LeoGuildManager.AutoKick(kick)
+function LeoGuildManager.AutoKick()
     for _, guildName in pairs(LeoGuildManager.guilds) do
         local guildId = LeoGuildManager.GetGuildId(guildName)
         if DoesPlayerHaveGuildPermission(guildId, GUILD_PERMISSION_REMOVE) and LeoGuildManager.globalData.settings.guilds[guildName].blacklist ~= nil then
@@ -580,8 +580,10 @@ function LeoGuildManager.AutoKick(kick)
                 for guildMemberIndex = 1, numGuildMembers do
                     local displayName = GetGuildMemberInfo(guildId, guildMemberIndex)
                     if displayName == userId then
-                        LeoGuildManager.log("Found " .. userId .. " on " .. guildName)
-                        if kick == true then
+                        if LeoGuildManager.GetWarnOnline(guildName) then
+                            LeoGuildManager.log("Found " .. userId .. " on " .. guildName)
+                        end
+                        if LeoGuildManager.GetAutoKick(guildName) == true then
                             LeoGuildManager.log("Kicking ...")
                             GuildRemove(guildId, userId)
                         end
@@ -871,7 +873,7 @@ function LeoGuildManager:DeleteOldData()
 end

 function LeoGuildManager:OnUpdate()
-    LeoGuildManager.AutoKick(true)
+    LeoGuildManager.AutoKick()
 end

 local function onSettingsControlsCreated(panel)
diff --git a/LeoGuildManager.txt b/LeoGuildManager.txt
index a454f4f..a67c50a 100644
--- a/LeoGuildManager.txt
+++ b/LeoGuildManager.txt
@@ -1,7 +1,7 @@
 ## Title: Leo's Guild Manager
 ## APIVersion: 100029 100030
-## Version: 1.2.2
-## AddOnVersion: 1202
+## Version: 1.2.3
+## AddOnVersion: 1203
 ## Author: |c39B027@LeandroSilva|r
 ## SavedVariables: LeoGuildManagerGlobalData LeoGuildManagerScanData
 ## DependsOn: LibStub LibFeedback LibAddonMenu-2.0
diff --git a/LeoGuildManagerInit.lua b/LeoGuildManagerInit.lua
index bb2db96..925cd10 100644
--- a/LeoGuildManagerInit.lua
+++ b/LeoGuildManagerInit.lua
@@ -4,7 +4,7 @@ LeoGuildManagerUI = LeoGuildManagerUI or {}

 LeoGuildManager.name = "LeoGuildManager"
 LeoGuildManager.displayName = "Leo's Guild Manager"
-LeoGuildManager.version = "1.2.2"
+LeoGuildManager.version = "1.2.3"
 LeoGuildManager.chatPrefix = "|c39B027" .. LeoGuildManager.name .. "|r: "

 LeoGuildManager.TAB_PURGE = "Purge"