From 81ed7e3c159f61b2fe9c125772283b298b6e7073 Mon Sep 17 00:00:00 2001 From: Nico Golde Date: Sat, 14 Jul 2007 13:11:09 +0200 Subject: [PATCH] workaround, server messages about users dont open a user directory anymore, output will be sent to the server out file --- CHANGES | 6 ++++++ config.mk | 2 +- ii.c | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index c8ff80e..46fe80a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +1.3 (xxxx-xx-xx): + - server messages about users (QUIT,JOIN) will no longer + go to the user directories but to the server out file to + give an easy method to monitor it and to prevent spamming + the irc directory. + 1.2 (2007-06-23): - Exit on channel creation failure, thanks Michael Prokop - Implemented joining of password protected channels diff --git a/config.mk b/config.mk index c48eeb5..314e9fc 100644 --- a/config.mk +++ b/config.mk @@ -23,5 +23,5 @@ LIBS = -L${LIBDIR} -L/usr/lib -lc # compiler CC = cc -CFLAGS = -g -O0 -W -Wall ${INCLUDES} -DVERSION=\"${VERSION}\" +CFLAGS = -g -O0 -W -Wall -Wextra ${INCLUDES} -DVERSION=\"${VERSION}\" LDFLAGS = ${LIBS} diff --git a/ii.c b/ii.c index 692bb00..138d15a 100644 --- a/ii.c +++ b/ii.c @@ -201,10 +201,13 @@ static size_t tokenize(char **result, size_t reslen, char *str, char delim) { static void print_out(char *channel, char *buf) { static char outfile[256]; + static char server[256]; FILE *out; static char buft[18]; time_t t = time(0); + snprintf(server, sizeof(server), "-!- %s", channel); + if(strstr(buf, server)) channel=""; create_filepath(outfile, sizeof(outfile), channel, "out"); if(!(out = fopen(outfile, "a"))) return;