diff options
author | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-19 11:28:00 +0200 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-19 11:28:00 +0200 |
commit | cf883fc48fc5404d1b37f9f8005286e227123147 (patch) | |
tree | 4ed1d16d9dac9de3857d424d60fc5637c8562b67 /app.go | |
parent | Add /R command (diff) |
ui: Show self /msg and /r even if echo-message is off
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -379,8 +379,24 @@ func (app *App) handleInput(buffer, content string) { target := split[0] content := split[1] app.s.PrivMsg(target, content) - // TODO echo mssage + if !app.s.HasCapability("echo-message") { + if app.s.IsChannel(target) { + buffer = ui.Home + } else { + buffer = target + } + line := ui.LineFromIRCMessage(time.Now(), app.s.Nick(), content, false, false) + app.win.AddLine(buffer, line) + } case "R": + if buffer != ui.Home { + return + } + app.s.PrivMsg(app.lastQuery, args) + if !app.s.HasCapability("echo-message") { + line := ui.LineFromIRCMessage(time.Now(), app.s.Nick(), args, false, false) + app.win.AddLine(ui.Home, line) + } } } |