mirror of https://github.com/velour/catbase.git
Fixes #19: Removing logging statements.
This commit is contained in:
parent
13fa9dd079
commit
377de90c31
|
@ -2,14 +2,12 @@ package plugins
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/chrissexton/alepale/bot"
|
||||
"labix.org/v2/mgo"
|
||||
"labix.org/v2/mgo/bson"
|
||||
"log"
|
||||
"strings"
|
||||
)
|
||||
|
||||
import "github.com/chrissexton/alepale/bot"
|
||||
|
||||
// This is a counter plugin to count arbitrary things.
|
||||
|
||||
type CounterPlugin struct {
|
||||
|
@ -41,8 +39,6 @@ func (p *CounterPlugin) Message(message bot.Message) bool {
|
|||
channel := message.Channel
|
||||
parts := strings.Split(message.Body, " ")
|
||||
|
||||
log.Println("++Message:", nick, channel, parts)
|
||||
|
||||
if len(parts) == 0 {
|
||||
return false
|
||||
}
|
||||
|
@ -131,8 +127,6 @@ func (p *CounterPlugin) Message(message bot.Message) bool {
|
|||
itemName = nameParts[1]
|
||||
}
|
||||
|
||||
log.Println("++:", subject, itemName)
|
||||
|
||||
if strings.HasSuffix(parts[0], "++") {
|
||||
// ++ those fuckers
|
||||
item := p.update(subject, itemName, 1)
|
||||
|
|
|
@ -5,7 +5,6 @@ import (
|
|||
"github.com/chrissexton/alepale/bot"
|
||||
"labix.org/v2/mgo"
|
||||
"labix.org/v2/mgo/bson"
|
||||
"log"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -178,16 +177,6 @@ func (p *RememberPlugin) Event(kind string, message bot.Message) bool {
|
|||
|
||||
// Record what the bot says in the log
|
||||
func (p *RememberPlugin) BotMessage(message bot.Message) bool {
|
||||
log.Printf("Recieved: %+v\n", 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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue