test
This commit is contained in:
11
packet.go
11
packet.go
@@ -161,6 +161,11 @@ type PacketServerRCon struct {
|
||||
Output string
|
||||
}
|
||||
|
||||
type PacketServerRConEnd struct {
|
||||
Packet
|
||||
Command string
|
||||
}
|
||||
|
||||
func (p *PacketAdminJoin) Bytes() []byte {
|
||||
buf := new(bytes.Buffer)
|
||||
p.PLength = uint16(len(p.Password) + len(p.AppName) + len(p.AppVersion) + 6)
|
||||
@@ -324,3 +329,9 @@ func (p *PacketServerRCon) Read(b []byte) {
|
||||
p.ColorID = binary.LittleEndian.Uint16(bs[0:])
|
||||
p.Output, _ = r.ReadString(0)
|
||||
}
|
||||
|
||||
func (p *PacketServerRConEnd) Read(b []byte) {
|
||||
r := bufio.NewReader(bytes.NewReader(b))
|
||||
r.Discard(3)
|
||||
p.Command, _ = r.ReadString(0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user