ii

git clone https://orangeshoelaces.net/git/ii.git

81ed7e3c159f61b2fe9c125772283b298b6e7073

Author: Nico Golde on 07/14/2007

Committer: Nico Golde on 07/14/2007

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

Stats

CHANGES   | 6 ++++++
config.mk | 2 +-
ii.c      | 3 +++
3 files changed, 10 insertions(+), 1 deletion(-)

Patch

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;