diff options
author | Timo Sirainen <cras@irssi.org> | 2001-11-18 23:29:18 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-11-18 23:29:18 +0000 |
commit | c94606e27a06bd8fcf982f12c0a776b9084345b2 (patch) | |
tree | 10218e8b2394c33c7909a53babda719c21901cef /src/irc | |
parent | edf0e479b5cb874f72223f3056a31b8913b0850a (diff) | |
download | irssi-c94606e27a06bd8fcf982f12c0a776b9084345b2.zip |
Data sent to server with /RAWQUOTE didn't show up properly in rawlog unless
it ended with \r\n.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2068 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/irc-servers.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 30f99684..3314aa24 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -325,8 +325,12 @@ static void server_cmd_timeout(IRC_SERVER_REC *server, GTimeVal *now) server->wait_cmd.tv_sec = 0; memcpy(&server->last_cmd, now, sizeof(GTimeVal)); - /* add to rawlog without CR+LF */ - cmd[len-2] = '\0'; + /* add to rawlog without [CR+]LF (/RAWQUOTE might not have + added the CR) */ + if (len > 2 && cmd[len-2] == '\r') + cmd[len-2] = '\0'; + else if (cmd[len-1] == '\n') + cmd[len-1] = '\0'; rawlog_output(server->rawlog, cmd); server_redirect_command(server, cmd, redirect); |