gottdad/main.go
2020-06-14 16:59:55 +02:00

28 lines
625 B
Go

package main
import (
"bufio"
"net"
)
func main() {
conn, err := net.Dial("tcp", "poop.siteop.biz:3977")
failError(err, "net.Dial")
logInfoDebug("Connected to poop.siteop.biz:3977")
//send auth
p := PacketAdminJoin{
Packet: Packet{PType: AdminPacketAdminJoin},
Password: []byte("plop"),
AppName: []byte("gottdad"),
AppVersion: []byte("alpha"),
}
_, err = conn.Write(p.Bytes())
failError(err, "conn.Write")
logInfoDebug("Authentication sent (%s)", string(p.Bytes()))
// listen for reply
message, _ := bufio.NewReader(conn).ReadString('\n')
logInfoDebug("Message from server: %s", message)
}