From 4fcb5ad5100bc369db3fbcbeac04d9fe9ab23aed Mon Sep 17 00:00:00 2001 From: TheHolyRoger <39387497+TheHolyRoger@users.noreply.github.com> Date: Thu, 18 Jun 2020 20:40:25 +0100 Subject: [PATCH] Only colour IRC nicks if there is one. --- bridge/irc/irc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go index 5fc315a7..6e97996f 100644 --- a/bridge/irc/irc.go +++ b/bridge/irc/irc.go @@ -206,7 +206,7 @@ func (b *Birc) doSend() { for msg := range b.Local { <-throttle.C username := msg.Username - if b.GetBool("Colornicks") { + if b.GetBool("Colornicks") && len(username) > 1 { checksum := crc32.ChecksumIEEE([]byte(msg.Username)) colorCode := checksum%14 + 2 // quick fix - prevent white or black color codes username = fmt.Sprintf("\x03%02d%s\x0F", colorCode, msg.Username)