summaryrefslogtreecommitdiff
path: root/server/channel/command.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/channel/command.go')
-rw-r--r--server/channel/command.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/channel/command.go b/server/channel/command.go
index e645055..05a1c7a 100644
--- a/server/channel/command.go
+++ b/server/channel/command.go
@@ -17,9 +17,15 @@ func (c *Channel) SendRequest(r session.Request) {
m := r.Cmd.Args[0]
switch m.Kind {
case "m":
- for k, _ := range m.Fields {
+ for k, v := range m.Fields {
switch k {
case "":
+ case "reply":
+ _, ok := c.byId[v]
+ if !ok {
+ r.Reply(proto.Fail{"bad-reply", "", nil}.Cmd())
+ return
+ }
default:
r.ReplyInvalid()
return