1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Cut the messages sent to rawlog to 510 chars too.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1617 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-07-14 18:52:53 +00:00 committed by cras
parent 0cd57fb201
commit b500815724

View File

@ -54,16 +54,23 @@ void irc_send_cmd_full(IRC_SERVER_REC *server, const char *cmd,
len = strlen(cmd);
server->cmdcount++;
if (!raw) {
/* check that we don't send any longer commands
than 510 bytes (2 bytes for CR+LF) */
strncpy(str, cmd, 510);
if (len > 510) len = 510;
str[len] = '\0';
cmd = str;
}
if (send_now)
rawlog_output(server->rawlog, cmd);
if (!raw) {
/* check that we don't send any longer commands
than 512 bytes. also add the line feed. */
strncpy(str, cmd, 510);
if (len > 510) len = 510;
str[len++] = 13; str[len++] = 10; str[len] = '\0';
cmd = str;
/* Add CR+LF to command */
str[len++] = 13;
str[len++] = 10;
str[len] = '\0';
}
if (send_now) {