summaryrefslogtreecommitdiff
path: root/client/command.go
diff options
context:
space:
mode:
Diffstat (limited to 'client/command.go')
-rw-r--r--client/command.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/client/command.go b/client/command.go
index 2bc7868..6079070 100644
--- a/client/command.go
+++ b/client/command.go
@@ -117,6 +117,22 @@ func (a *application) doCommand(command string, args []string, text string) {
a.cmdWindow.who(u.Id)
}
})
+ case "msg":
+ a.lookup(text, "u", func(u *proto.Object, fail *proto.Fail) {
+ if fail != nil {
+ a.cmdWindow.fail(proto.Object(*fail))
+ } else {
+ a.joinDirect([]proto.Object {*u})
+ }
+ })
+ case "msgall":
+ a.lookupAll(args, "u", func(us []proto.Object, fail *proto.Fail) {
+ if fail != nil {
+ a.cmdWindow.fail(proto.Object(*fail))
+ } else {
+ a.joinDirect(us)
+ }
+ })
case "create":
if a.authenticated {
a.createChannel(text)