Source

pcw / ii-1.4-joinuser.diff

Diff from to

ii-1.4-joinuser.diff

 diff -r d93eaacde742 ii.c
 --- a/ii.c	Fri Jun 25 10:55:05 2010 +0200
-+++ b/ii.c	Mon Jul 12 15:37:39 2010 -0700
++++ b/ii.c	Tue Jul 13 02:20:46 2010 -0700
 @@ -105,6 +105,7 @@
  	return open(infile, O_RDONLY | O_NONBLOCK, 0);
  }
  			}
  			break;
  		case 't':
+@@ -357,6 +362,8 @@
+ 		argv[TOK_CHAN] = argv[TOK_TEXT];
+ 		snprintf(message, PIPE_BUF, "-!- %s(%s) has joined %s", argv[TOK_NICKSRV], argv[TOK_USER], argv[TOK_TEXT]);
+ 	} else if(!strncmp("PART", argv[TOK_CMD], 5)) {
++		if (!strcmp(nick, argv[TOK_NICKSRV]))
++			return;
+ 		snprintf(message, PIPE_BUF, "-!- %s(%s) has left %s", argv[TOK_NICKSRV], argv[TOK_USER], argv[TOK_CHAN]);
+ 	} else if(!strncmp("MODE", argv[TOK_CMD], 5))
+ 		snprintf(message, PIPE_BUF, "-!- %s changed mode/%s -> %s %s", argv[TOK_NICKSRV], argv[TOK_CMD + 1] ? argv[TOK_CMD + 1] : "" , argv[TOK_CMD + 2]? argv[TOK_CMD + 2] : "", argv[TOK_CMD + 3] ? argv[TOK_CMD + 3] : "");