diff options
author | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-01 13:22:04 +0200 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-01 13:22:04 +0200 |
commit | 8f08d53e0f3b60b79df253b24ecd34169be23f29 (patch) | |
tree | 8207250d1685f660c972c53cd4443477c56cfceb /cmd | |
parent | Simplify color() (diff) |
Display queries in "home" buffer
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/irc/main.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/irc/main.go b/cmd/irc/main.go index 02f0304..b4461a5 100644 --- a/cmd/irc/main.go +++ b/cmd/irc/main.go @@ -76,10 +76,20 @@ func handleIRCEvent(app *ui.UI, ev irc.Event) { case irc.UserPartEvent: line := fmt.Sprintf("\x034-\x0314%s", ev.Nick) app.AddLine(ev.Channel, line, ev.Time, true) + case irc.QueryMessageEvent: + line := formatIRCMessage(ev.Nick, ev.Content) + app.AddLine("home", line, ev.Time, false) + app.TypingStop("home", ev.Nick) case irc.ChannelMessageEvent: line := formatIRCMessage(ev.Nick, ev.Content) app.AddLine(ev.Channel, line, ev.Time, false) app.TypingStop(ev.Channel, ev.Nick) + case irc.QueryTypingEvent: + if ev.State == 1 || ev.State == 2 { + app.TypingStart("home", ev.Nick) + } else { + app.TypingStop("home", ev.Nick) + } case irc.ChannelTypingEvent: if ev.State == 1 || ev.State == 2 { app.TypingStart(ev.Channel, ev.Nick) |