Moved sleep back to the beginning of the for so that he wouldn't spit beers out too quickly on start

This commit is contained in:
Chris Sexton 2012-12-01 19:00:51 -05:00
parent 62bef551a6
commit a05252a2b0
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}
}