commit 19f6458
Hubert Hirtz
·
2021-11-03 17:38:30 +0000 UTC
parent b622455
Remove IRC formatting before printing the topic I prefer this over printing the IRC formatted string, since the topic should be printed in gray.
1 files changed,
+3,
-1
M
app.go
M
app.go
+3,
-1
1@@ -693,7 +693,8 @@ func (app *App) handleIRCEvent(netID string, ev interface{}) {
2 })
3 }
4 case irc.TopicChangeEvent:
5- body := fmt.Sprintf("Topic changed to: %s", ev.Topic)
6+ topic := ui.IRCString(ev.Topic).String()
7+ body := fmt.Sprintf("Topic changed to: %s", topic)
8 app.win.AddLine(netID, ev.Channel, ui.NotifyUnread, ui.Line{
9 At: msg.TimeOrNow(),
10 Head: "--",
11@@ -1024,6 +1025,7 @@ func (app *App) printTopic(netID, buffer string) (ok bool) {
12 return false
13 }
14 topic, who, at := s.Topic(buffer)
15+ topic = ui.IRCString(topic).String()
16 if who == nil {
17 body = fmt.Sprintf("Topic: %s", topic)
18 } else {