Fixes #19: Removing logging statements.

This commit is contained in:
Chris Sexton 2013-05-07 23:17:25 -04:00
parent 13fa9dd079
commit 377de90c31
2 changed files with 1 additions and 18 deletions

View File

@ -2,14 +2,12 @@ package plugins
import ( import (
"fmt" "fmt"
"github.com/chrissexton/alepale/bot"
"labix.org/v2/mgo" "labix.org/v2/mgo"
"labix.org/v2/mgo/bson" "labix.org/v2/mgo/bson"
"log"
"strings" "strings"
) )
import "github.com/chrissexton/alepale/bot"
// This is a counter plugin to count arbitrary things. // This is a counter plugin to count arbitrary things.
type CounterPlugin struct { type CounterPlugin struct {
@ -41,8 +39,6 @@ func (p *CounterPlugin) Message(message bot.Message) bool {
channel := message.Channel channel := message.Channel
parts := strings.Split(message.Body, " ") parts := strings.Split(message.Body, " ")
log.Println("++Message:", nick, channel, parts)
if len(parts) == 0 { if len(parts) == 0 {
return false return false
} }
@ -131,8 +127,6 @@ func (p *CounterPlugin) Message(message bot.Message) bool {
itemName = nameParts[1] itemName = nameParts[1]
} }
log.Println("++:", subject, itemName)
if strings.HasSuffix(parts[0], "++") { if strings.HasSuffix(parts[0], "++") {
// ++ those fuckers // ++ those fuckers
item := p.update(subject, itemName, 1) item := p.update(subject, itemName, 1)

View File

@ -5,7 +5,6 @@ import (
"github.com/chrissexton/alepale/bot" "github.com/chrissexton/alepale/bot"
"labix.org/v2/mgo" "labix.org/v2/mgo"
"labix.org/v2/mgo/bson" "labix.org/v2/mgo/bson"
"log"
"math/rand" "math/rand"
"strings" "strings"
"time" "time"
@ -178,16 +177,6 @@ func (p *RememberPlugin) Event(kind string, message bot.Message) bool {
// Record what the bot says in the log // Record what the bot says in the log
func (p *RememberPlugin) BotMessage(message bot.Message) bool { func (p *RememberPlugin) BotMessage(message bot.Message) bool {
log.Printf("Recieved: %+v\n", message)
p.Log[message.Channel] = append(p.Log[message.Channel], message) p.Log[message.Channel] = append(p.Log[message.Channel], message)
for ch, _ := range p.Log {
log.Printf("Channel: %+v\n", ch)
for _, msg := range p.Log[ch] {
log.Println(msg)
}
}
log.Printf("Log:\n%+v\n", p.Log)
return false return false
} }