use rcon
This commit is contained in:
16
packet.go
16
packet.go
@@ -505,22 +505,6 @@ func (p *PacketServerChat) Read(b []byte) {
|
||||
p.Amount = binary.LittleEndian.Uint64(bs[0:])
|
||||
}
|
||||
|
||||
func (p *PacketServerChat) Bytes() []byte {
|
||||
buf := new(bytes.Buffer)
|
||||
p.PLength = uint16(len(p.Message) + 17)
|
||||
|
||||
binary.Write(buf, binary.LittleEndian, p.PLength)
|
||||
binary.Write(buf, binary.LittleEndian, p.ActionID)
|
||||
binary.Write(buf, binary.LittleEndian, p.DestinationID)
|
||||
binary.Write(buf, binary.LittleEndian, p.ClientID)
|
||||
buf.WriteString(p.Message)
|
||||
buf.WriteByte(0)
|
||||
binary.Write(buf, binary.LittleEndian, p.Amount)
|
||||
|
||||
return buf.Bytes()
|
||||
|
||||
}
|
||||
|
||||
func (p *PacketServerConsole) Read(b []byte) {
|
||||
r := bufio.NewReader(bytes.NewReader(b))
|
||||
r.Discard(3)
|
||||
|
||||
Reference in New Issue
Block a user