autofish's colorable output for windows
and non color output for daze
This commit is contained in:
@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"github.com/Tnze/go-mc/bot"
|
||||
"github.com/Tnze/go-mc/chat"
|
||||
"github.com/mattn/go-colorable"
|
||||
"log"
|
||||
"time"
|
||||
)
|
||||
@ -15,6 +16,7 @@ var (
|
||||
)
|
||||
|
||||
func main() {
|
||||
log.SetOutput(colorable.NewColorableStdout())
|
||||
c = bot.NewClient()
|
||||
|
||||
//Login
|
||||
|
@ -47,7 +47,7 @@ func onGameStart() error {
|
||||
}
|
||||
|
||||
func onChatMsg(c chat.Message, pos byte) error {
|
||||
log.Println("Chat:", c)
|
||||
log.Println("Chat:", c.ClearString()) // output chat message without any format code (like color or bold)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user