2024-06-23 04:19:27 +00:00
|
|
|
package messages7
|
|
|
|
|
|
|
|
import (
|
|
|
|
"slices"
|
|
|
|
|
|
|
|
"github.com/teeworlds-go/go-teeworlds-protocol/chunk7"
|
|
|
|
"github.com/teeworlds-go/go-teeworlds-protocol/network7"
|
|
|
|
"github.com/teeworlds-go/go-teeworlds-protocol/packer"
|
|
|
|
)
|
|
|
|
|
|
|
|
type RconCmdRem struct {
|
|
|
|
ChunkHeader *chunk7.ChunkHeader
|
|
|
|
|
|
|
|
Name string
|
|
|
|
}
|
|
|
|
|
2024-06-23 19:18:54 +00:00
|
|
|
func (msg *RconCmdRem) MsgId() int {
|
2024-06-23 04:19:27 +00:00
|
|
|
return network7.MsgSysRconCmdRem
|
|
|
|
}
|
|
|
|
|
2024-06-23 19:18:54 +00:00
|
|
|
func (msg *RconCmdRem) MsgType() network7.MsgType {
|
2024-06-23 04:19:27 +00:00
|
|
|
return network7.TypeNet
|
|
|
|
}
|
|
|
|
|
2024-06-23 19:18:54 +00:00
|
|
|
func (msg *RconCmdRem) System() bool {
|
2024-06-23 04:19:27 +00:00
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
2024-06-23 19:18:54 +00:00
|
|
|
func (msg *RconCmdRem) Vital() bool {
|
2024-06-23 04:19:27 +00:00
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
2024-06-23 19:18:54 +00:00
|
|
|
func (msg *RconCmdRem) Pack() []byte {
|
2024-06-23 04:19:27 +00:00
|
|
|
return slices.Concat(
|
|
|
|
packer.PackStr(msg.Name),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2024-06-23 19:18:54 +00:00
|
|
|
func (msg *RconCmdRem) Unpack(u *packer.Unpacker) error {
|
2024-06-25 04:19:51 +00:00
|
|
|
msg.Name, _ = u.GetString()
|
2024-06-23 19:18:54 +00:00
|
|
|
return nil
|
2024-06-23 04:19:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (msg *RconCmdRem) Header() *chunk7.ChunkHeader {
|
|
|
|
return msg.ChunkHeader
|
|
|
|
}
|
|
|
|
|
|
|
|
func (msg *RconCmdRem) SetHeader(header *chunk7.ChunkHeader) {
|
|
|
|
msg.ChunkHeader = header
|
|
|
|
}
|