update release

Leandro Silva [01-21-20 - 19:28]
update release
Filename
LeoGuildManager.lua
LeoGuildManager.txt
LeoGuildManager.xml
LeoGuildManagerInit.lua
LeoGuildManagerUI.lua
Settings.lua
diff --git a/LeoGuildManager.lua b/LeoGuildManager.lua
index f7f31fc..572433b 100644
--- a/LeoGuildManager.lua
+++ b/LeoGuildManager.lua
@@ -9,7 +9,6 @@ LeoGuildManager.nextGuildScan = 1
 LeoGuildManager.isDebug = false

 LeoGuildManager.manualScan = false
-local eventTooOld = {}

 local scanInterval = 5 * LeoGuildManager.MS_IN_MINUTE
 local shortScanInterval = 2000
@@ -55,10 +54,10 @@ function LeoGuildManager.TimeAgo(timestamp)
     local diff = GetTimeStamp() - timestamp
     if diff < 3600 then
         ago = ZO_CachedStrFormat(GetString(SI_TIME_FORMAT_MINUTES), math.floor(diff / 60))
-    elseif diff < 86400 then
+    elseif diff < LeoGuildManager.SECONDS_IN_DAY then
         ago = ZO_CachedStrFormat(GetString(SI_TIME_FORMAT_HOURS), math.floor(diff / 3600))
     else
-        ago = ZO_CachedStrFormat(GetString(SI_TIME_FORMAT_DAYS), math.floor(diff / 86400))
+        ago = ZO_CachedStrFormat(GetString(SI_TIME_FORMAT_DAYS), math.floor(diff / LeoGuildManager.SECONDS_IN_DAY))
     end
     return ZO_CachedStrFormat(GetString(SI_TIME_DURATION_AGO), ago)
 end
@@ -421,16 +420,20 @@ local function initGuildScanData(guildName)
             [GUILD_HISTORY_GENERAL] = {
                 firstEvent = 0,
                 lastEvent = 0,
+                numAdded = 0,
                 events = {}
             },
             [GUILD_HISTORY_BANK] = {
                 firstEvent = 0,
                 lastEvent = 0,
+                numAdded = 0,
                 events = {}
             },
             members = {}
         }
     end
+    LeoGuildManager.scanData[guildName][GUILD_HISTORY_GENERAL].numAdded = 0
+    LeoGuildManager.scanData[guildName][GUILD_HISTORY_BANK].numAdded = 0
 end

 local function initMemberScanData(guildName, displayName)
@@ -497,7 +500,7 @@ function LeoGuildManager.Initialize()
         LeoGuildManager.globalData.settings = {
             integration = LeoGuildManager.integrations[1],
             tooltipRoster = false,
-            scanAutomatically = false,
+            scanAutomatically = true,
             autoKick = false,
             warnOnline = true,
             guilds = {},
@@ -550,12 +553,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
-                            d("Found " .. userId .. " on " .. guildName .. ". Kicking ...")
+                            LeoGuildManager.log("Kicking ...")
                             GuildRemove(guildId, userId)
-                            d("Bye bye!")
-                        else
-                            d("Found " .. userId .. " on " .. guildName)
                         end
                         break
                     end
@@ -583,13 +584,13 @@ end
 function ZO_KeyboardGuildRosterRowDisplayName_OnMouseEnter(control)
     orig_ZO_KeyboardGuildRosterRowDisplayName_OnMouseEnter(control)

-    if not LeoGuildManager.globalData.settings.tooltipRoster then
+    local guildName = GetGuildName(GUILD_SELECTOR.guildId)
+    if not LeoGuildManager.UseTooltipRoster(guildName) then
         return
     end

     local parent = control:GetParent()
     local data = ZO_ScrollList_GetData(parent)
-    local guildName = GetGuildName(GUILD_SELECTOR.guildId)
     local displayName = data.displayName
     local timeStamp = GetTimeStamp()

@@ -635,11 +636,23 @@ function LeoGuildManager.ProcessEvent(guildId, category, eventIndex)
     local displayName = param1
     local timeStamp = GetTimeStamp() - evTime

-    if timeStamp < 0 or timeStamp < 31 * LeoGuildManager.SECONDS_IN_HOUR then
-        eventTooOld[guildId] = true
-        return
+    if timeStamp < 0 then
+        return false
+    end
+    -- Fetch bank history for a month only
+    if category == GUILD_HISTORY_BANK and timeStamp < 31 * LeoGuildManager.SECONDS_IN_HOUR then
+        LeoGuildManager.debug("Gold event older than 31 days for guild " .. GetGuildName(guildId) .. " " .. LeoGuildManager.TimeAgo(timeStamp))
+        return false
+    end
+    -- Already scanned this far
+    LeoGuildManager.debug("New event for " .. GetGuildName(guildId) .. " on " .. LeoGuildManager.TimeAgo(timeStamp) .. " first " .. LeoGuildManager.TimeAgo(LeoGuildManager.scanData[guildName][category].firstEvent) .. " last " .. LeoGuildManager.TimeAgo(LeoGuildManager.scanData[guildName][category].lastEvent))
+    local limit = math.min(LeoGuildManager.scanData[guildName][category].lastEvent or 0, LeoGuildManager.scanData[guildName][category].fistEvent or 0)
+    if category == GUILD_HISTORY_GENERAL and timeStamp < limit then
+        LeoGuildManager.debug("General event older than " .. limit .. " days for guild " .. GetGuildName(guildId))
+        return false
     end
-    eventTooOld[guildId] = false
+
+    LeoGuildManager.scanData[guildName][category].numAdded = LeoGuildManager.scanData[guildName][category].numAdded + 1

     if LeoGuildManager.scanData[guildName][category].lastEvent == 0 or
             LeoGuildManager.scanData[guildName][category].lastEvent < timeStamp then
@@ -654,10 +667,12 @@ function LeoGuildManager.ProcessEvent(guildId, category, eventIndex)
         if (evType == GUILD_EVENT_GUILD_JOIN) then
             initMemberScanData(guildName, displayName)
             LeoGuildManager.scanData[guildName].members[displayName].joined = timeStamp
+            LeoGuildManager.debug("Added guild event (".. displayName .. " joined) for guild " .. GetGuildName(guildId) .. " from " .. LeoGuildManager.TimeAgo(timeStamp))
         elseif (evType == GUILD_EVENT_GUILD_INVITE) then
             initMemberScanData(guildName, param2)
             LeoGuildManager.scanData[guildName].members[param2].invited = timeStamp
             LeoGuildManager.scanData[guildName].members[param2].invitedBy = param1
+            LeoGuildManager.debug("Added guild event (".. param2 .. " invited by " .. param1 .. ") for guild " .. GetGuildName(guildId) .. " from " .. LeoGuildManager.TimeAgo(timeStamp))
         end
     end

@@ -671,7 +686,15 @@ function LeoGuildManager.ProcessEvent(guildId, category, eventIndex)
                 gold = param2
             }
         end
+
+        if evType == GUILD_EVENT_BANKGOLD_ADDED then
+            LeoGuildManager.debug("Added bank event (".. displayName .. " deposited " .. param2 .. " gold) for guild " .. GetGuildName(guildId) .. " from " .. LeoGuildManager.TimeAgo(timeStamp))
+        elseif evType == GUILD_EVENT_BANKGOLD_REMOVED then
+            LeoGuildManager.debug("Added bank event (".. displayName .. " withdrew " .. param2 .. " gold) for guild " .. GetGuildName(guildId) .. " from " .. LeoGuildManager.TimeAgo(timeStamp))
+        end
     end
+
+    return true
 end

 local function onGuildHistoryResponseReceived(eventCode, guildId, category)
@@ -679,36 +702,33 @@ local function onGuildHistoryResponseReceived(eventCode, guildId, category)
         return
     end

-    local numEvents = GetNumGuildEvents(guildId, category)
-    for i = 1, numEvents do
-        LeoGuildManager.ProcessEvent(guildId, category, i)
-    end
-end
+    LeoGuildManager.nextGuildHistoryScanIndex = LeoGuildManager.nextGuildHistoryScanIndex or {}
+    LeoGuildManager.nextGuildHistoryScanIndex[guildId] = LeoGuildManager.nextGuildHistoryScanIndex[guildId] or 1

-local function RequestGuildHistoryCategoryOlderLocal(guildIndex, category, numGuilds)
+    local guildName = GetGuildName(guildId)
+    initGuildScanData(guildName)

-    local guildId = GetGuildId(guildIndex)
+    local numEvents = GetNumGuildEvents(guildId, category)
+    if numEvents > 0 then
+        LeoGuildManager.debug("Handling " .. numEvents .. " events for guild " .. GetGuildName(guildId))
+    end

-    if eventTooOld[guildId] ~= nil and eventTooOld[guildId] == true then
-        if (guildIndex < numGuilds) then
-            LeoGuildManager.nextGuildScan = guildIndex + 1
-        else
-            LeoGuildManager.nextGuildScan = 1
-        end
-        --LeoGuildManager.log("Events too old")
-        return false
+    for i = LeoGuildManager.nextGuildHistoryScanIndex[guildId], numEvents do
+        LeoGuildManager.ProcessEvent(guildId, category, i)
     end

-    if (RequestGuildHistoryCategoryOlder(guildId, category)) then
-        if (guildIndex < numGuilds) then
-            LeoGuildManager.nextGuildScan = guildIndex + 1
-        else
-            LeoGuildManager.nextGuildScan = 1
-        end
-        return true
+    local guildEvents = LeoGuildManager.scanData[guildName][GUILD_HISTORY_GENERAL].numAdded or 0
+    local bankEvents = LeoGuildManager.scanData[guildName][GUILD_HISTORY_BANK].numAdded or 0
+    if guildEvents > 0 then
+        LeoGuildManager.log("Added " .. guildEvents .. " guild events for guild " .. guildName)
+        -- RequestMoreGuildHistoryCategoryEvents(guildId, GUILD_HISTORY_GENERAL)
+    end
+    if bankEvents > 0 then
+        LeoGuildManager.log("Added " .. bankEvents .. " bank events for guild " .. guildName)
+        -- RequestMoreGuildHistoryCategoryEvents(guildId, GUILD_HISTORY_BANK)
     end

-    return false
+    LeoGuildManager.nextGuildHistoryScanIndex[guildId] = numEvents + 1
 end

 function LeoGuildManager.HasIntegrationAddonsLoaded(integration)
@@ -737,117 +757,52 @@ function LeoGuildManager.CanScanBankHistory(guildId)
             DoesPlayerHaveGuildPermission(guildId, GUILD_PERMISSION_BANK_VIEW_GOLD)
 end

-local manualScan = false
-function LeoGuildManager.StartScanGuilds(manual)
+function LeoGuildManager.StartScanGuilds()
     if LeoGuildManager.isScanning == true then
-        if manual == true then
-            LeoGuildManager.log("A scan is already running ...")
-        end
-        return
-    end
-
-    manualScan = false
-    if manual == true then
-        manualScan = true
-        LeoGuildManager.log("Starting guild scan ...")
-    elseif LeoGuildManager.globalData.settings.scanAutomatically == false then
-        zo_callLater(function()
-            LeoGuildManager.StartScanGuilds()
-        end, 5000)
         return
     end

     LeoGuildManager.isScanning = true

-    LeoGuildManagerWindowPurgePanelScanButton:SetEnabled(false)
-    LeoGuildManagerWindowPurgePanelLoadingIcon:SetHidden(false)
-    LeoGuildManagerWindowPurgePanelLoadingIcon.animation:PlayForward()
-
     LeoGuildManager.ScanGuilds()
 end

 function LeoGuildManager.FinishScanGuilds()
-
     LeoGuildManager.isScanning = false
-
-    LeoGuildManagerWindowPurgePanelScanButton:SetEnabled(true)
-    LeoGuildManagerWindowPurgePanelLoadingIcon:SetHidden(true)
-    LeoGuildManagerWindowPurgePanelLoadingIcon.animation:Stop()
-
-    if manualScan == true then
-        manualScan = false
-        LeoGuildManager.log("Scan finished for all guilds.")
-    else
-        zo_callLater(LeoGuildManager.ScanGuilds, scanInterval)
-    end
+    zo_callLater(LeoGuildManager.ScanGuilds, scanInterval)
 end

 function LeoGuildManager.ScanGuilds()
-    if not LeoGuildManager.inCombat then
-
-        local numGuilds = GetNumGuilds()
-        local guildId
+    if LeoGuildManager.inCombat then
+        zo_callLater(LeoGuildManager.ScanGuilds, shortScanInterval)
+    end

-        for i = 1, numGuilds do
-            guildId = GetGuildId(i)
+    local numGuilds = GetNumGuilds()
+    local guildId

-            if LeoGuildManager.GuildNeedsScan(guildId) then
-                local guildName = GetGuildName(guildId)
-                initGuildScanData(guildName)
-                if (LeoGuildManager.UseTooltipRoster(guildName) and RequestGuildHistoryCategoryNewest(guildId, GUILD_HISTORY_GENERAL)) then
-                    LeoGuildManager.debug("Starting scan for new guild events on " .. guildName .. " ...")
-                    zo_callLater(LeoGuildManager.ScanGuilds, shortScanInterval)
-                    return
-                end
-                if (LeoGuildManager.CanScanBankHistory(guildId) and RequestGuildHistoryCategoryNewest(guildId, GUILD_HISTORY_BANK)) then
-                    LeoGuildManager.debug("Starting scan for new bank events on " .. guildName .. " ...")
-                    zo_callLater(LeoGuildManager.ScanGuilds, shortScanInterval)
-                    return
-                end
+    for i = 1, numGuilds do
+        guildId = GetGuildId(i)

-            end
-        end
+        if LeoGuildManager.GuildNeedsScan(guildId) then
+            local guildName = GetGuildName(guildId)

-        for i = LeoGuildManager.nextGuildScan, numGuilds do
-            guildId = GetGuildId(i)
-            if LeoGuildManager.GuildNeedsScan(guildId) then
-                local guildName = GetGuildName(guildId)
-                if (LeoGuildManager.UseTooltipRoster(guildName) and RequestGuildHistoryCategoryOlderLocal(i, GUILD_HISTORY_GENERAL, numGuilds)) then
-                    LeoGuildManager.debug("Starting scan for old general events on " .. guildName .. " ...")
-                    zo_callLater(LeoGuildManager.ScanGuilds, shortScanInterval)
-                    return
-                end
-                if (LeoGuildManager.CanScanBankHistory(guildId) and RequestGuildHistoryCategoryOlderLocal(i, GUILD_HISTORY_BANK, numGuilds)) then
-                    LeoGuildManager.debug("Starting scan for old bank events on " .. guildName .. " ...")
-                    zo_callLater(LeoGuildManager.ScanGuilds, shortScanInterval)
-                    return
-                end
-            end
-        end
+            -- if not HasGuildHistoryCategoryEverBeenRequested(guildId, GUILD_HISTORY_GENERAL) then
+                -- LeoGuildManager.debug("Starting scan for general events on " .. guildName .. " ...")
+                RequestMoreGuildHistoryCategoryEvents(guildId, GUILD_HISTORY_GENERAL)
+            -- end

-        for i = 1, LeoGuildManager.nextGuildScan - 1 do
-            guildId = GetGuildId(i)
-            if LeoGuildManager.GuildNeedsScan(guildId) then
-                local guildName = GetGuildName(guildId)
-                if (LeoGuildManager.UseTooltipRoster(guildName) and RequestGuildHistoryCategoryOlderLocal(i, GUILD_HISTORY_GENERAL, numGuilds)) then
-                    LeoGuildManager.debug("Starting scan for old general2 events on " .. guildName .. " ...")
-                    zo_callLater(LeoGuildManager.ScanGuilds, shortScanInterval)
-                    return
-                end
-                if (LeoGuildManager.CanScanBankHistory(guildId) and RequestGuildHistoryCategoryOlderLocal(i, GUILD_HISTORY_BANK, numGuilds)) then
-                    LeoGuildManager.debug("Starting scan for old bank2 events on " .. guildName .. " ...")
-                    zo_callLater(LeoGuildManager.ScanGuilds, shortScanInterval)
-                    return
-                end
+            if LeoGuildManager.CanScanBankHistory(guildId) then
+                -- if not HasGuildHistoryCategoryEverBeenRequested(guildId, GUILD_HISTORY_BANK) then
+                    -- LeoGuildManager.debug("Starting scan for bank events on " .. guildName .. " ...")
+                    RequestMoreGuildHistoryCategoryEvents(guildId, GUILD_HISTORY_BANK)
+                -- end
             end
         end
+    end

-        LeoGuildManager.nextGuildScan = 1
+    LeoGuildManager.nextGuildScan = 1

-        LeoGuildManager.FinishScanGuilds()
-    else
-        zo_callLater(LeoGuildManager.ScanGuilds, shortScanInterval)
-    end
+    zo_callLater(LeoGuildManager.ScanGuilds, 10000)
 end

 function LeoGuildManager:OnUpdate()
@@ -899,7 +854,6 @@ function LeoGuildManager.OnAddOnLoaded(event, addonName)
         CHAMPION_PERKS_SCENE:RegisterCallback('StateChange', onChampionPerksSceneStateChange)
         EVENT_MANAGER:RegisterForEvent(LeoGuildManager.name, EVENT_PLAYER_COMBAT_STATE, onCombatState)
         EVENT_MANAGER:RegisterForEvent(LeoGuildManager.name, EVENT_GUILD_HISTORY_RESPONSE_RECEIVED, onGuildHistoryResponseReceived)
-
         LeoGuildManager.log("started.")
     end
 end
diff --git a/LeoGuildManager.txt b/LeoGuildManager.txt
index 33525f6..70d981a 100644
--- a/LeoGuildManager.txt
+++ b/LeoGuildManager.txt
@@ -1,28 +1,10 @@
 ## Title: Leo's Guild Manager
-## APIVersion: 100024 100025
-## Version: 1.1.10
-## AddOnVersion: 1110
+## APIVersion: 100029 100030
+## Version: 1.2.0
+## AddOnVersion: 1200
 ## Author: |c39B027@LeandroSilva|r
 ## SavedVariables: LeoGuildManagerGlobalData LeoGuildManagerScanData
-## OptionalDependsOn: LibStub LibFeedback LibAddonMenu-2.0
-
-Libs\LibStub\LibStub.lua
-libs\LibFeedback\feedback.lua
-Libs\LibAddonMenu-2.0\LibAddonMenu-2.0.lua
-Libs\LibAddonMenu-2.0\controls\panel.lua
-Libs\LibAddonMenu-2.0\controls\submenu.lua
-Libs\LibAddonMenu-2.0\controls\button.lua
-Libs\LibAddonMenu-2.0\controls\checkbox.lua
-Libs\LibAddonMenu-2.0\controls\colorpicker.lua
-Libs\LibAddonMenu-2.0\controls\custom.lua
-Libs\LibAddonMenu-2.0\controls\description.lua
-Libs\LibAddonMenu-2.0\controls\dropdown.lua
-Libs\LibAddonMenu-2.0\controls\editbox.lua
-Libs\LibAddonMenu-2.0\controls\header.lua
-Libs\LibAddonMenu-2.0\controls\slider.lua
-Libs\LibAddonMenu-2.0\controls\texture.lua
-Libs\LibAddonMenu-2.0\controls\iconpicker.lua
-Libs\LibAddonMenu-2.0\controls\divider.lua
+## DependsOn: LibStub LibFeedback LibAddonMenu-2.0

 LeoGuildManager.xml
 LeoGuildManagerInit.lua
diff --git a/LeoGuildManager.xml b/LeoGuildManager.xml
index a388c9a..7720b25 100644
--- a/LeoGuildManager.xml
+++ b/LeoGuildManager.xml
@@ -104,13 +104,13 @@
                             <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" offsetX="20" offsetY="20" />
                         </Label>

-                        <Button name="$(parent)ScanButton" text="Scan Guild" inherits="ZO_DefaultButton" clickSound="Click">
+                        <!-- <Button name="$(parent)ScanButton" text="Scan Guild" inherits="ZO_DefaultButton" clickSound="Click">
                             <Anchor point="TOPRIGHT" relativeTo="$(parent)" relativePoint="TOPRIGHT" offsetX="-10" offsetY="20"/>
                             <Dimensions x="180" />
                             <OnClicked> LeoGuildManager.StartScanGuilds(true) </OnClicked>
-                        </Button>
+                        </Button> -->
                         <Button name="$(parent)ListButton" text="List Members" inherits="ZO_DefaultButton" clickSound="Click">
-                            <Anchor point="TOPLEFT" relativeTo="$(parent)ScanButton" relativePoint="TOPLEFT" offsetX="0" offsetY="40"/>
+                            <Anchor point="TOPRIGHT" relativeTo="$(parent)" relativePoint="TOPRIGHT" offsetX="-10" offsetY="20"/>
                             <Dimensions x="180" />
                             <OnClicked> LeoGuildManager:ListPurge() </OnClicked>
                         </Button>
diff --git a/LeoGuildManagerInit.lua b/LeoGuildManagerInit.lua
index 013509c..4ce1d21 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.1.10"
+LeoGuildManager.version = "1.2.0"
 LeoGuildManager.chatPrefix = "|c39B027" .. LeoGuildManager.name .. "|r: "

 LeoGuildManager.TAB_PURGE = "Purge"
@@ -36,7 +36,7 @@ LeoGuildManager.MS_IN_MINUTE = 60 * 1000
 LeoGuildManager.SECONDS_IN_HOUR = 60 * 60
 LeoGuildManager.SECONDS_IN_DAY = LeoGuildManager.SECONDS_IN_HOUR * 24
 LeoGuildManager.SECONDS_IN_WEEK = LeoGuildManager.SECONDS_IN_DAY * 7
-
+LeoGuildManager.SECONDS_IN_MONTH = LeoGuildManager.SECONDS_IN_DAY * 30

 LeoGuildManager.integrations = {
     "Master Merchant",
diff --git a/LeoGuildManagerUI.lua b/LeoGuildManagerUI.lua
index c819098..dc73889 100644
--- a/LeoGuildManagerUI.lua
+++ b/LeoGuildManagerUI.lua
@@ -72,11 +72,11 @@ function LeoGuildManager.ShowTab(tab)
     if tab == LeoGuildManager.TAB_PURGE then
         local descPurge = LeoGuildManager.CreatePurgeDescription(LeoGuildManager.globalData.selectedGuild)
         LeoGuildManagerWindowPurgePanelPurgeDesc:SetText("|c"..LeoGuildManager.color.hex.yellow..descPurge.."|r")
-        if LeoGuildManager.GuildNeedsScan(LeoGuildManager.GetGuildId(LeoGuildManager.globalData.selectedGuild)) then
+        --[[if LeoGuildManager.GuildNeedsScan(LeoGuildManager.GetGuildId(LeoGuildManager.globalData.selectedGuild)) then
             LeoGuildManagerWindowPurgePanelScanButton:SetHidden(false)
         else
             LeoGuildManagerWindowPurgePanelScanButton:SetHidden(true)
-        end
+        end--]]
     end

     LeoGuildManager.globalData.activeTab = tab
@@ -618,7 +618,7 @@ function LeoGuildManager.ListPurge()
     local cycle = LeoGuildManager.globalData.settings.guilds[guildName].cycle
     local start, finish = getStartFinishFromCycle(cycle)
     if (start == nil or finish == nil) and (canScan == true or integrationLoaded == true) then
-        LeoGuildManager.log("Error fetching time frame settings.")
+        LeoGuildManager.log("Error fetching time frame settings. Did you configure the guild in the Settings?")
         return
     end

@@ -691,11 +691,11 @@ function LeoGuildManagerUI.InitializeUI()
                 if not initializing then
                     LeoGuildManager.ClearList()
                 end
-                if LeoGuildManager.GuildNeedsScan(LeoGuildManager.GetGuildId(guildName)) then
+                --[[if LeoGuildManager.GuildNeedsScan(LeoGuildManager.GetGuildId(guildName)) then
                     LeoGuildManagerWindowPurgePanelScanButton:SetHidden(false)
                 else
                     LeoGuildManagerWindowPurgePanelScanButton:SetHidden(true)
-                end
+                end--]]
             end)
             if not LeoGuildManager.globalData.selectedGuild then
                 LeoGuildManager.globalData.selectedGuild = guildName
diff --git a/Settings.lua b/Settings.lua
index 2b9728a..be7aa8d 100644
--- a/Settings.lua
+++ b/Settings.lua
@@ -37,13 +37,13 @@ function LeoGuildManagerSettings:CreatePanel()
             getFunc = function() return LeoGuildManager.globalData.settings.integration end,
             setFunc = function(value) LeoGuildManager.globalData.settings.integration = value end,
             requiresReload = true
-		},{
+		},--[[{
             type = "checkbox",
             name = "Scan guilds automatically",
             default = false,
             getFunc = function() return LeoGuildManager.globalData.settings.scanAutomatically end,
             setFunc = function(value) LeoGuildManager.globalData.settings.scanAutomatically = value end,
-		},{
+		},--]]{
 			type = "header",
 			name = "|c3f7fffGuilds|r"
 		}
@@ -94,8 +94,8 @@ function LeoGuildManagerSettings:CreatePanel()
                         type = "checkbox",
                         name = "Add guild roster tooltip",
                         default = false,
-                        warning = "This feature requires periodic guild scan.",
-                        getFunc = function() LeoGuildManager.UseTooltipRoster(guild) end,
+                        -- warning = "This feature requires periodic guild scan.",
+                        getFunc = function() return LeoGuildManager.UseTooltipRoster(guild) end,
                         setFunc = function(value) LeoGuildManager.SetTooltipRoster(guild, value) end,
                     },{
                         type = "submenu",