workaround, server messages about users dont open a user directory anymore, output will be sent to the server out file

This commit is contained in:
Nico Golde 2007-07-14 13:11:09 +02:00
parent 91f3f2efb3
commit 81ed7e3c15
3 changed files with 10 additions and 1 deletions

View File

@ -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): 1.2 (2007-06-23):
- Exit on channel creation failure, thanks Michael Prokop - Exit on channel creation failure, thanks Michael Prokop
- Implemented joining of password protected channels - Implemented joining of password protected channels

View File

@ -23,5 +23,5 @@ LIBS = -L${LIBDIR} -L/usr/lib -lc
# compiler # compiler
CC = cc CC = cc
CFLAGS = -g -O0 -W -Wall ${INCLUDES} -DVERSION=\"${VERSION}\" CFLAGS = -g -O0 -W -Wall -Wextra ${INCLUDES} -DVERSION=\"${VERSION}\"
LDFLAGS = ${LIBS} LDFLAGS = ${LIBS}

3
ii.c
View File

@ -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 void print_out(char *channel, char *buf) {
static char outfile[256]; static char outfile[256];
static char server[256];
FILE *out; FILE *out;
static char buft[18]; static char buft[18];
time_t t = time(0); time_t t = time(0);
snprintf(server, sizeof(server), "-!- %s", channel);
if(strstr(buf, server)) channel="";
create_filepath(outfile, sizeof(outfile), channel, "out"); create_filepath(outfile, sizeof(outfile), channel, "out");
if(!(out = fopen(outfile, "a"))) return; if(!(out = fopen(outfile, "a"))) return;