aboutsummaryrefslogtreecommitdiffstats
path: root/packet/command/bad/bad.go
diff options
context:
space:
mode:
Diffstat (limited to 'packet/command/bad/bad.go')
-rw-r--r--packet/command/bad/bad.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/packet/command/bad/bad.go b/packet/command/bad/bad.go
new file mode 100644
index 0000000..dfab5de
--- /dev/null
+++ b/packet/command/bad/bad.go
@@ -0,0 +1,19 @@
+package bad
+
+import (
+ "github.com/osm/quake/common/buffer"
+ "github.com/osm/quake/common/context"
+ "github.com/osm/quake/protocol"
+)
+
+type Command struct {
+ Type protocol.CommandType
+}
+
+func (cmd *Command) Bytes() []byte {
+ return []byte{byte(cmd.Type)}
+}
+
+func Parse(ctx *context.Context, buf *buffer.Buffer, typ protocol.CommandType) (*Command, error) {
+ return &Command{Type: typ}, nil
+}