diff options
author | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-18 22:26:38 +0200 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-18 22:26:38 +0200 |
commit | 3adffd7a038a22217ddc4aa004c94cc06cea35b2 (patch) | |
tree | e1e03259b39cfe899153e46a73457c1d2530ad32 | |
parent | irc: Fix RPL_TOPICWHOTIME handling (diff) |
Add /R command
-rw-r--r-- | app.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -18,6 +18,8 @@ type App struct { cfg Config highlights []string + + lastQuery string } func NewApp(cfg Config) (app *App, err error) { @@ -116,6 +118,7 @@ func (app *App) handleIRCEvent(ev irc.Event) { l := ui.LineFromIRCMessage(ev.Time, ev.Nick, ev.Content, false, true) app.win.AddLine(ui.Home, l) app.win.TypingStop(ui.Home, ev.Nick) + app.lastQuery = ev.Nick } else if ev.Command == "NOTICE" { l := ui.LineFromIRCMessage(ev.Time, ev.Nick, ev.Content, true, false) app.win.AddLine("", l) @@ -377,5 +380,7 @@ func (app *App) handleInput(buffer, content string) { content := split[1] app.s.PrivMsg(target, content) // TODO echo mssage + case "R": + app.s.PrivMsg(app.lastQuery, args) } } |