forked from External/ergo
Fix trailing hack
This commit is contained in:
parent
dd6aacee61
commit
22f9df388d
1 changed files with 5 additions and 5 deletions
|
|
@ -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")
|
message = ircmsg.MakeMessage(nil, client.server.name, ERR_UNKNOWNERROR, "*", "Error assembling message for sending")
|
||||||
line, _ := message.Line()
|
line, _ := message.Line()
|
||||||
|
|
||||||
|
client.socket.Write(line)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// if we used the trailing hack, we need to strip the final space we appended earlier on
|
// if we used the trailing hack, we need to strip the final space we appended earlier on
|
||||||
if usedTrailingHack {
|
if usedTrailingHack {
|
||||||
line = line[:len(line)-3] + "\r\n"
|
line = line[:len(line)-3] + "\r\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
client.socket.Write(line)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
client.server.logger.Debug("useroutput", client.nick, " ->", strings.TrimRight(line, "\r\n"))
|
client.server.logger.Debug("useroutput", client.nick, " ->", strings.TrimRight(line, "\r\n"))
|
||||||
|
|
||||||
client.socket.Write(line)
|
client.socket.Write(line)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue