This commit is contained in:
shoopea 2020-06-14 17:31:47 +02:00
parent 6ddec0775c
commit 0a56868b9f

4
def.go
View File

@ -60,8 +60,8 @@ func (p *PacketAdminJoin) Bytes() []byte {
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
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)
buf.WriteByte(p.PLength) binary.Write(buf, binary.LittleEndian, p.PLength)
buf.WriteByte(p.PType) binary.Write(buf, binary.LittleEndian, p.PType)
buf.WriteString(p.Password) buf.WriteString(p.Password)
buf.WriteString(p.AppName) buf.WriteString(p.AppName)
buf.WriteString(p.AppVersion) buf.WriteString(p.AppVersion)