summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Hirtz <hubert@hirtz.pm>2021-11-03 18:38:30 +0100
committerHubert Hirtz <hubert@hirtz.pm>2021-11-03 18:38:30 +0100
commit19f64582133bd56c4888655a290b2375f97b60fa (patch)
tree04720412a27c7aee575c38f084881febe061acb0
parentFix 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.go4
1 files changed, 3 insertions, 1 deletions
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 {