commit e5c8c6e

Hubert Hirtz  ·  2020-08-04 12:53:24 +0000 UTC
parent 6585251
Add a head for status lines

to avoid it to be mistaken for the continuation of the previous message
1 files changed,  +2, -2
+2, -2
 1@@ -75,12 +75,12 @@ func handleIRCEvent(app *ui.UI, s *irc.Session, ev irc.Event) {
 2 		app.AddBuffer(ev.Channel)
 3 	case irc.UserJoinEvent:
 4 		line := fmt.Sprintf("\x033+\x0314%s", ev.Nick)
 5-		app.AddLine(ev.Channel, ui.NewLine(ev.Time, "", line, true), false)
 6+		app.AddLine(ev.Channel, ui.NewLine(ev.Time, "--", line, true), false)
 7 	case irc.SelfPartEvent:
 8 		app.RemoveBuffer(ev.Channel)
 9 	case irc.UserPartEvent:
10 		line := fmt.Sprintf("\x034-\x0314%s", ev.Nick)
11-		app.AddLine(ev.Channel, ui.NewLine(ev.Time, "", line, true), false)
12+		app.AddLine(ev.Channel, ui.NewLine(ev.Time, "--", line, true), false)
13 	case irc.QueryMessageEvent:
14 		if ev.Command == "PRIVMSG" {
15 			l := ui.LineFromIRCMessage(ev.Time, ev.Nick, ev.Content, false)