diff options
Diffstat (limited to 'server/channel/command.go')
| -rw-r--r-- | server/channel/command.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/server/channel/command.go b/server/channel/command.go index 94cf38f..5190efe 100644 --- a/server/channel/command.go +++ b/server/channel/command.go @@ -251,3 +251,20 @@ func (c *Channel) SendRequest(r session.Request) { r.ReplyInvalid() } } + +func (t Tombstone) SendRequest(r session.Request) { + switch r.Cmd.Kind { + + case "update": + r.Reply(proto.Fail{"bad-target", "", nil}.Cmd()) + + case "i", "s": + r.Reply(proto.NewCmd("i", "", t.GetInfo())) + + case "u": + r.ReplyOk() + + default: + r.ReplyInvalid() + } +} |
