5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-22 17:30:26 +00:00

End IRC username formatting with a total formatting reset (irc) (#425)

* Add zero padding to the color code

* Change color ending into total formatting reset
This commit is contained in:
Yuval Langer 2018-05-18 22:33:37 +03:00 committed by Wim
parent f0738a93c3
commit 887c2bc56d

View File

@ -250,7 +250,7 @@ func (b *Birc) doSend() {
username := msg.Username username := msg.Username
if b.GetBool("Colornicks") { if b.GetBool("Colornicks") {
checksum := crc32.ChecksumIEEE([]byte(msg.Username)) checksum := crc32.ChecksumIEEE([]byte(msg.Username))
username = fmt.Sprintf("\x03%d%s\x03", checksum%0x10, msg.Username) username = fmt.Sprintf("\x03%02d%s\x0F", checksum%0x10, msg.Username)
} }
if msg.Event == config.EVENT_USER_ACTION { if msg.Event == config.EVENT_USER_ACTION {
b.i.Cmd.Action(msg.Channel, username+msg.Text) b.i.Cmd.Action(msg.Channel, username+msg.Text)