3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 10:42:52 +01:00

Fix trailing hack

This commit is contained in:
Daniel Oaks 2018-04-16 02:28:25 +10:00
parent dd6aacee61
commit 22f9df388d

View File

@ -811,15 +811,15 @@ func (client *Client) SendRawMessage(message ircmsg.IrcMessage) error {
message = ircmsg.MakeMessage(nil, client.server.name, ERR_UNKNOWNERROR, "*", "Error assembling message for sending")
line, _ := message.Line()
// if we used the trailing hack, we need to strip the final space we appended earlier on
if usedTrailingHack {
line = line[:len(line)-3] + "\r\n"
}
client.socket.Write(line)
return err
}
// if we used the trailing hack, we need to strip the final space we appended earlier on
if usedTrailingHack {
line = line[:len(line)-3] + "\r\n"
}
client.server.logger.Debug("useroutput", client.nick, " ->", strings.TrimRight(line, "\r\n"))
client.socket.Write(line)