Skip to content

Commit

Permalink
修复一点风格问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Tnze committed May 29, 2019
1 parent 2407b4f commit bfb5e51
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 2 additions & 0 deletions bot/ingame.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"io"
"io/ioutil"

// "math"
// "time"
"fmt"
Expand Down Expand Up @@ -123,6 +124,7 @@ func (c *Client) handlePacket(p pk.Packet) (disconnect bool, err error) {
case data.NamedSoundEffect:
err = handleNamedSoundEffect(c, p)
default:

// fmt.Printf("ignore pack id %X\n", p.ID)
}
return
Expand Down
5 changes: 3 additions & 2 deletions cmd/daze/daze.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package main

import (
// "github.com/Tnze/go-mc/authenticate"
"log"

"github.com/Tnze/go-mc/bot"
"github.com/Tnze/go-mc/chat"
"log"
// "github.com/Tnze/go-mc/authenticate"
)

func main() {
Expand Down
10 changes: 8 additions & 2 deletions cmd/ping/ping.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
package main

import (
"github.com/Tnze/go-mc/bot"
"log"
"os"

"github.com/Tnze/go-mc/bot"
)

func main() {
resp, delay, err := bot.PingAndList("play.miaoscraft.cn", 25565)
if len(os.Args) < 2 {
log.Fatalln("no host name. Useage: ping [hostname]")
}

resp, delay, err := bot.PingAndList(os.Args[1], 25565)
if err != nil {
log.Fatalf("ping and list server fail: %v", err)
}
Expand Down

0 comments on commit bfb5e51

Please sign in to comment.