This commit is contained in:
shoopea 2020-06-14 17:19:12 +02:00
parent c70d1daf07
commit 330a7c6216

1
def.go
View File

@ -59,6 +59,7 @@ type PacketAdminJoin struct {
func (p *PacketAdminJoin) Bytes() []byte { func (p *PacketAdminJoin) Bytes() []byte {
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
enc := gob.NewEncoder(buf) enc := gob.NewEncoder(buf)
buf.Reset()
p.PLength = uint16(len(p.Password) + len(p.AppName) + len(p.AppVersion) + 3) p.PLength = uint16(len(p.Password) + len(p.AppName) + len(p.AppVersion) + 3)
err := enc.Encode(p) err := enc.Encode(p)