From a05252a2b033c21c34d7a8fca6d0ee4145ee16fb Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Sat, 1 Dec 2012 19:00:51 -0500 Subject: [PATCH] Moved sleep back to the beginning of the for so that he wouldn't spit beers out too quickly on start --- plugins/beers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/beers.go b/plugins/beers.go index 64e3aba..98b7396 100644 --- a/plugins/beers.go +++ b/plugins/beers.go @@ -322,6 +322,8 @@ func (p *BeersPlugin) checkUntappd(channel string) { // users := []string{"Tir"} for { + time.Sleep(time.Duration(frequency) * time.Second) + var users []untappdUser p.Coll.Find(bson.M{"untappduser": bson.M{"$exists": true}}).All(&users) @@ -352,7 +354,5 @@ func (p *BeersPlugin) checkUntappd(channel string) { p.Bot.SendMessage(channel, msg) } } - - time.Sleep(time.Duration(frequency) * time.Second) } }