summaryrefslogtreecommitdiff
path: root/commands.go
diff options
context:
space:
mode:
authordelthas <delthas@dille.cc>2021-12-01 13:46:42 +0100
committerdelthas <delthas@dille.cc>2022-02-10 11:21:26 +0100
commit8d2b4a928c2783657cccbfe7b9aa5a9f77be3c9e (patch)
tree6212dabe20439b901bf267dd8d1a1666376aa17b /commands.go
parentdocs: update Ctrl-C behaviour (diff)
MONITOR user with whom we have an open buffer
Diffstat (limited to 'commands.go')
-rw-r--r--commands.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/commands.go b/commands.go
index 403aec8..09582b6 100644
--- a/commands.go
+++ b/commands.go
@@ -341,6 +341,8 @@ func commandDoMsg(app *App, args []string) (err error) {
Time: time.Now(),
})
if buffer != "" && !s.IsChannel(target) {
+ app.monitor[netID][buffer] = struct{}{}
+ s.MonitorAdd(buffer)
app.win.AddBuffer(netID, "", buffer)
}
@@ -449,6 +451,7 @@ func commandDoQuery(app *App, args []string) (err error) {
if s.IsChannel(target) {
return fmt.Errorf("cannot query a channel, use JOIN instead")
}
+ s.MonitorAdd(target)
i, _ := app.win.AddBuffer(netID, "", target)
s.NewHistoryRequest(target).WithLimit(200).Before(time.Now())
app.win.JumpBufferIndex(i)