ii

irc it, simple FIFO based irc client
git clone git://git.suckless.org/ii
Log | Files | Refs | README | LICENSE

commit 81ed7e3c159f61b2fe9c125772283b298b6e7073
parent 91f3f2efb37df275a70b9985acd7118184de84b7
Author: Nico Golde <nion@suckless.org>
Date:   Sat, 14 Jul 2007 13:11:09 +0200

workaround, server messages about users dont open a user directory anymore, output will be sent to the server out file
Diffstat:
MCHANGES | 6++++++
Mconfig.mk | 2+-
Mii.c | 3+++
3 files changed, 10 insertions(+), 1 deletion(-)

diff --git 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 @@ -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 @@ -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;