mirror of https://github.com/velour/catbase.git
Made the bot a bit less verbose (axed some debug printing)
This commit is contained in:
parent
c8bc3a6034
commit
e4c755faaa
|
@ -24,7 +24,6 @@ func (b *Bot) checkuser(nick string) *User {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if user == nil {
|
if user == nil {
|
||||||
fmt.Println("Making a new user")
|
|
||||||
user = &User{
|
user = &User{
|
||||||
Name: nick,
|
Name: nick,
|
||||||
Alts: make([]string, 1),
|
Alts: make([]string, 1),
|
||||||
|
@ -68,7 +67,6 @@ func (b *Bot) isCmd(message string) (bool, string) {
|
||||||
iscmd := false
|
iscmd := false
|
||||||
|
|
||||||
if strings.HasPrefix(message, cmdc) && len(cmdc) > 0 {
|
if strings.HasPrefix(message, cmdc) && len(cmdc) > 0 {
|
||||||
fmt.Println("Got a commandchar prefix")
|
|
||||||
iscmd = true
|
iscmd = true
|
||||||
message = message[len(cmdc):]
|
message = message[len(cmdc):]
|
||||||
} else if strings.HasPrefix(message, botnick) {
|
} else if strings.HasPrefix(message, botnick) {
|
||||||
|
@ -123,7 +121,6 @@ func (b *Bot) MsgRecieved(conn *irc.Conn, line *irc.Line) {
|
||||||
Command: iscmd,
|
Command: iscmd,
|
||||||
Action: isaction,
|
Action: isaction,
|
||||||
}
|
}
|
||||||
fmt.Printf("%#v said %#v\n", user, msg)
|
|
||||||
for _, p := range b.Plugins {
|
for _, p := range b.Plugins {
|
||||||
if p.Message(msg) {
|
if p.Message(msg) {
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue