diff --git a/index.go.html b/index.go.html index d85ec8c..65740e6 100644 --- a/index.go.html +++ b/index.go.html @@ -206,18 +206,26 @@

- + {{ if gt (len (.Queried.GetPlayers .Data.ShowAnonymousPlayers)) 0 }} + {{ if .Data.ShowAnonymousPlayers }} {{ range .Queried.Players }} - + {{ end }} {{ else }} + {{ range .Queried.Players }} + + + + {{ end }} + {{ end }} + {{ else }} @@ -232,7 +240,7 @@

Player List{{ if .Queried.PlayerCount }} ({{ .Queried.PlayerCount }}) {{ end }}Player List{{ if .Queried.PlayerCount }} ({{ .Queried.PlayerCount }}) {{ end }}
Collapse Player List
{{ if or .Data.ShowAnonymousPlayers (ne . "Anonymous Player") }}{{ . }}{{ end }}{{ . }}
{{ if ne . "Anonymous Player" }}{{ . }}{{ end }}
No Detectable Players.
- + diff --git a/pageHandler/pages/index/index-page.go b/pageHandler/pages/index/index-page.go index 1c62e22..2c365cd 100644 --- a/pageHandler/pages/index/index-page.go +++ b/pageHandler/pages/index/index-page.go @@ -42,6 +42,7 @@ type Page struct { LastModifiedTemplate time.Time CachedMC *MC CollectedMCExpiry time.Time + LastModifiedMC time.Time CacheMCMutex *sync.Mutex } @@ -50,10 +51,16 @@ func (p *Page) GetPath() string { } func (p *Page) GetLastModified() time.Time { + var toTest time.Time if p.LastModifiedData.After(p.LastModifiedTemplate) { - return p.LastModifiedData + toTest = p.LastModifiedData } else { - return p.LastModifiedTemplate + toTest = p.LastModifiedTemplate + } + if p.LastModifiedMC.After(toTest) { + return p.LastModifiedMC + } else { + return toTest } } @@ -114,7 +121,8 @@ func (p *Page) GetMC(theData *DataYaml, theMarshal *Marshal) MC { theMarshal.Online = false p.CachedMC = nil } - p.CollectedMCExpiry = time.Now().Add(theData.MCQueryInterval) + p.LastModifiedMC = time.Now() + p.CollectedMCExpiry = p.LastModifiedMC.Add(theData.MCQueryInterval) } else { if p.CachedMC == nil { theMC = MC{}
Mod List ({{ .Queried.PlayerCount }})Mod List ({{ .Queried.PlayerCount }})
Collapse Mod List