From 19f64582133bd56c4888655a290b2375f97b60fa Mon Sep 17 00:00:00 2001 From: Hubert Hirtz Date: Wed, 3 Nov 2021 18:38:30 +0100 Subject: Remove IRC formatting before printing the topic I prefer this over printing the IRC formatted string, since the topic should be printed in gray. --- app.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app.go b/app.go index 0b165e0..8dca093 100644 --- a/app.go +++ b/app.go @@ -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 { -- cgit v1.2.3