diff options
Diffstat (limited to 'cmd/client')
| -rw-r--r-- | cmd/client/main.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/client/main.go b/cmd/client/main.go index b107d93..bc9f4ff 100644 --- a/cmd/client/main.go +++ b/cmd/client/main.go @@ -5,6 +5,7 @@ import ( "log" "net" "strings" + "time" "go.rctt.net/solec/client" "go.rctt.net/solec/core" @@ -32,6 +33,7 @@ func main() { prompt.Commands["send"] = sendMessage prompt.Commands["join"] = join prompt.Commands["leave"] = leave + prompt.Commands["history"] = history flag.StringVar(&serverAddr, "a", "localhost:9999", "Server address:port") flag.StringVar(&user, "u", "user", "username") @@ -68,3 +70,10 @@ func leave(args []string) { log.Println("cannot leave channel:", err) } } + +func history(args []string) { + err := c.GetHistory(args[0], time.Time{}, 99999999, 0) + if err != nil { + log.Println("cannot read channel history:", err) + } +} |
