diff --git a/mbnntp/commands.c b/mbnntp/commands.c index 7bfeb06f..bca62526 100644 --- a/mbnntp/commands.c +++ b/mbnntp/commands.c @@ -65,7 +65,7 @@ void send_xlat(char *inp) strncpy(temp, chartran(inp), sizeof(temp) -1); - Syslog('n', "> \"%s\"", printable(temp, 0)); +// Syslog('n', "> \"%s\"", printable(temp, 0)); PUTSTR(temp); PUTSTR((char *)"\r\n"); diff --git a/mbnntp/mbnntp.c b/mbnntp/mbnntp.c index 5d464ff7..29a1a41a 100644 --- a/mbnntp/mbnntp.c +++ b/mbnntp/mbnntp.c @@ -272,7 +272,7 @@ int get_nntp(char *buf, int max) void send_nntp(const char *format, ...) { - char *out; + char *out, p[4]; va_list va_ptr; out = calloc(4096, sizeof(char)); @@ -281,7 +281,16 @@ void send_nntp(const char *format, ...) vsnprintf(out, 4096, format, va_ptr); va_end(va_ptr); - Syslog('n', "> \"%s\"", printable(out, 0)); + /* + * Only log responses + */ + if (out[4] == ' ') { + strncpy(p, out, 3); + if (atoi(p) > 0) { + Syslog('n', "> \"%s\"", printable(out, 0)); + } + } + PUTSTR(out); PUTSTR((char *)"\r\n"); FLUSHOUT();