diff options
| author | bt <bt@rctt.net> | 2026-05-16 19:15:21 +0200 |
|---|---|---|
| committer | bt <bt@rctt.net> | 2026-05-16 22:46:48 +0200 |
| commit | 82902e9dc3ad67c49e4f9381b83d38a659efa083 (patch) | |
| tree | e53faaa5231eb6624fea4e4c448709d7a8765d37 /cmd/client/main.go | |
| parent | c04c73a4df223c8c2b2b42ed482fc0181948e6ea (diff) | |
| download | solec-82902e9dc3ad67c49e4f9381b83d38a659efa083.tar.gz solec-82902e9dc3ad67c49e4f9381b83d38a659efa083.zip | |
Add history reading
Diffstat (limited to 'cmd/client/main.go')
| -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) + } +} |
