Skip to content

Commit

Permalink
Edit error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
urFate committed Oct 1, 2021
1 parent 098c71f commit aa15122
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ func McPing() {

conn, err := net.Dial("tcp", host[0])
if err != nil {
log.Default().Fatalf("[Error] Cannot connect to the server \"%v\"", flag.Arg(0))
fmt.Printf("┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \033[31mOFFLINE\033[0m \n┃ %v\n\n┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n",
flag.Arg(0))
os.Exit(0)
}
status, delay, err := pingAndList(host[0], mcnet.WrapConn(conn), 340)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ func User() {

uuid, err := client.FetchUUID(flag.Arg(0))
if err != nil {
log.Fatalln(err)
log.Fatalf("\033[33mFailed to fetch user %v !", flag.Arg(0))
}

profile, err := client.FetchProfile(uuid, true)
if err != nil {
log.Fatalln(err)
log.Fatalf("\033[33mFailed to fetch user %v !", flag.Arg(0))
}

hist, err := client.FetchNameHistory(uuid)
if err != nil {
log.Fatalln(err)
log.Fatalf("\033[33mFailed to fetch user %v !", flag.Arg(0))
}

fmt.Printf("┏━━━━━━━━━━━━━━━ Profile ━━━━━━━━━━━━━━━\n┃ Name: %v\n┃ UUID: %v\n┣━━━━━━━━━━━━━ Name History ━━━━━━━━━━━━",
Expand Down

0 comments on commit aa15122

Please sign in to comment.