diff options
Diffstat (limited to 'cmd/client/main.go')
| -rw-r--r-- | cmd/client/main.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cmd/client/main.go b/cmd/client/main.go index f135a69..e15d917 100644 --- a/cmd/client/main.go +++ b/cmd/client/main.go @@ -24,6 +24,10 @@ func (h *Handler) HandleMessage(msg core.Message) { fmt.Printf("%s\t%s -> %s %s\n", msg.Timestamp.Format("2006/01/02 15:04:05.000"), msg.Source, msg.Target, msg.Content) } +func (h *Handler) HandleListItem(li core.ListItem) { + fmt.Println(li.Address) +} + func (h *Handler) HandleError(err error) { log.Println("client error:", err) } @@ -33,6 +37,7 @@ func main() { prompt.Commands["join"] = join prompt.Commands["leave"] = leave prompt.Commands["history"] = history + prompt.Commands["list"] = list var cfg client.Config @@ -81,3 +86,10 @@ func history(args []string) { log.Println("cannot read channel history:", err) } } + +func list(args []string) { + err := c.GetList(99999999, 0) + if err != nil { + log.Println("cannot channels list:", err) + } +} |
