summaryrefslogtreecommitdiffstats
path: root/bridge/irc/irc.go
diff options
context:
space:
mode:
authorTheHolyRoger <39387497+TheHolyRoger@users.noreply.github.com>2020-06-24 22:48:54 +0100
committerGitHub <noreply@github.com>2020-06-24 23:48:54 +0200
commit5847f7758ce0e9fbad53766efe495d7ba15adae4 (patch)
treeed4a1cddb2d9a9c94ea9a7ffab5911fe3df908e4 /bridge/irc/irc.go
parentbce736993efdc2501df26a2a773b4999c5580437 (diff)
downloadmatterbridge-msglm-5847f7758ce0e9fbad53766efe495d7ba15adae4.tar.gz
matterbridge-msglm-5847f7758ce0e9fbad53766efe495d7ba15adae4.tar.bz2
matterbridge-msglm-5847f7758ce0e9fbad53766efe495d7ba15adae4.zip
Only colour IRC nicks if there is one. (#1161)
Diffstat (limited to 'bridge/irc/irc.go')
-rw-r--r--bridge/irc/irc.go2
1 files changed, 1 insertions, 1 deletions
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)