Removing debug stuff

This commit is contained in:
Chris Sexton 2013-09-02 13:35:38 -04:00
parent d35fba2f87
commit d7389dfc5d
1 changed files with 1 additions and 4 deletions

View File

@ -37,18 +37,15 @@ func (b *Bot) GetUser(nick string) *User {
var user *User
count, err := query.Count()
log.Printf("Searching for %s. Found %d entries.\n", nick, count)
if err != nil {
log.Printf("Error fetching user, %s: %s\n", nick, err)
user = b.NewUser(nick)
coll.Insert(*user)
} else if count == 1 {
err = query.One(&user)
if err != nil {
panic(err)
log.Printf("ERROR adding user: %s -- %s\n", nick, err)
}
log.Printf("Found user: %s\n", nick)
} else if count == 0 {
// create the user
log.Printf("Creating new user: %s\n", nick)