diff options
| author | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-16 17:02:22 +0200 |
|---|---|---|
| committer | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-16 17:17:29 +0200 |
| commit | f1791d1c6e7fc3ac4d27bb206b1bd61d80fe96f0 (patch) | |
| tree | bb325625135245ccbef9018577d50ad08e52828c /app.go | |
| parent | ui: Show /me from self when echo-message is off (diff) | |
Add a /topic command
Diffstat (limited to '')
| -rw-r--r-- | app.go | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -318,6 +318,18 @@ func (app *App) handleInput(buffer, content string) { } app.s.Part(args) + case "TOPIC": + if buffer == ui.Home { + return + } + + if args == "" { + topic := app.s.Topic(buffer) + line := fmt.Sprintf("\x0314Topic: %s", topic) + app.win.AddLine(buffer, ui.NewLineNow("--", line)) + } else { + app.s.SetTopic(buffer, args) + } case "ME": if buffer == ui.Home { return |
