diff options
author | Hubert Hirtz <hubert@hirtz.pm> | 2021-11-03 18:38:30 +0100 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtz.pm> | 2021-11-03 18:38:30 +0100 |
commit | 19f64582133bd56c4888655a290b2375f97b60fa (patch) | |
tree | 04720412a27c7aee575c38f084881febe061acb0 | |
parent | Fix requried go version (diff) |
Remove IRC formatting before printing the topic
I prefer this over printing the IRC formatted string, since the topic
should be printed in gray.
-rw-r--r-- | app.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -693,7 +693,8 @@ func (app *App) handleIRCEvent(netID string, ev interface{}) { }) } case irc.TopicChangeEvent: - body := fmt.Sprintf("Topic changed to: %s", ev.Topic) + topic := ui.IRCString(ev.Topic).String() + body := fmt.Sprintf("Topic changed to: %s", topic) app.win.AddLine(netID, ev.Channel, ui.NotifyUnread, ui.Line{ At: msg.TimeOrNow(), Head: "--", @@ -1024,6 +1025,7 @@ func (app *App) printTopic(netID, buffer string) (ok bool) { return false } topic, who, at := s.Topic(buffer) + topic = ui.IRCString(topic).String() if who == nil { body = fmt.Sprintf("Topic: %s", topic) } else { |