Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 6b4e75c569f340ceb8f991891ce2bb082084919e Author: TheHolyRoger <39387497+TheHolyRoger@users.noreply.github.com> Date: Wed Jun 24 22:48:54 2020 +0000 Only colour IRC nicks if there is one. (#1161) diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go index 5fc315a..6e97996 100644 --- a/bridge/irc/irc.go +++ b/bridge/irc/irc.go @@ -2067 +2067 @@ 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)