From 22f9df388dc825c532624e38075f09c37f168d5f Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Mon, 16 Apr 2018 02:28:25 +1000 Subject: [PATCH] Fix trailing hack --- irc/client.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/irc/client.go b/irc/client.go index d309102a..0cafce83 100644 --- a/irc/client.go +++ b/irc/client.go @@ -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)