You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If Slack side has a bot user with spaces in name (e.g. "Travis CI") then IRC PRIVMSG's will be incorrect and fail parsing in IRC clients.
For example currently matterircd sends Travis CI!Travis CI@Travis CI PRIVMSG #dev :Build done
whereas it should be Travis_CI!Travis_CI@Travis_CI PRIVMSG #dev :Build done
One trivial fix would be to replace (at least) space in sorcix/irc
diff --git a/vendor/github.com/sorcix/irc/message.go b/vendor/github.com/sorcix/irc/message.go
index 088938d..9d34b27 100644
--- a/vendor/github.com/sorcix/irc/message.go+++ b/vendor/github.com/sorcix/irc/message.go@@ -123,14 +123,14 @@ func (p *Prefix) IsServer() bool {
// writeTo is an utility function to write the prefix to the bytes.Buffer in Message.String().
func (p *Prefix) writeTo(buffer *bytes.Buffer) {
- buffer.WriteString(p.Name)+ buffer.WriteString(strings.Replace(p.Name, " ", "_", -1))
if len(p.User) > 0 {
buffer.WriteByte(prefixUser)
- buffer.WriteString(p.User)+ buffer.WriteString(strings.Replace(p.User, " ", "_", -1))
}
if len(p.Host) > 0 {
buffer.WriteByte(prefixHost)
- buffer.WriteString(p.Host)+ buffer.WriteString(strings.Replace(p.Host, " ", "_", -1))
}
return
}
If Slack side has a bot user with spaces in name (e.g. "Travis CI") then IRC PRIVMSG's will be incorrect and fail parsing in IRC clients.
For example currently matterircd sends
Travis CI!Travis CI@Travis CI PRIVMSG #dev :Build done
whereas it should be
Travis_CI!Travis_CI@Travis_CI PRIVMSG #dev :Build done
One trivial fix would be to replace (at least) space in sorcix/irc
https://tools.ietf.org/html/rfc2812#section-2.3.1 contains list of allowed characters but at least for me it's enought to convert space into underscore
The text was updated successfully, but these errors were encountered: