Skip to content

Commit

Permalink
Maybe make the version check not so spammy.
Browse files Browse the repository at this point in the history
  • Loading branch information
Slackluster committed Jul 25, 2024
1 parent 5003c4b commit 08aaf31
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ function app.InitialiseCore()
app.Whispered = {}
app.Flag = {}
app.Flag["lastUpdate"] = 0
app.Flag["versionCheck"] = 0

-- Enable this CVar, because we need it
SetCVar("missingTransmogSourceInItemTooltips", 1)
Expand Down Expand Up @@ -1549,7 +1550,11 @@ function event:CHAT_MSG_ADDON(prefix, text, channel, sender, target, zoneChannel

-- Now compare our versions
if otherGameVersion > localGameVersion or (otherGameVersion == localGameVersion and otherAddonVersion > localAddonVersion) then
app.Print("There is a newer version of "..app.NameLong.." available: "..version)
-- But only send the message once every 10 minutes
if GetServerTime() - app.Flag["versionCheck"] > 600 then
app.Print("There is a newer version of "..app.NameLong.." available: "..version)
app.Flag["versionCheck"] = GetServerTime()
end
end
end
end
Expand Down

0 comments on commit 08aaf31

Please sign in to comment.