wm: ticl

Download patch

ref: 8cdec92600494e5d844cb79e25d95215cda12f8a
parent: 8d0c143cd5f978544806f8b58bcefc22aef92cb5
author: libredev <libredev@ircforever.org>
date: Fri Nov 25 06:13:07 EST 2022

fixed user's JOIN

--- a/main.c
+++ b/main.c
@@ -98,10 +98,10 @@
 	setvbuf(stdout, NULL, _IONBF, 0);
 
 	/* check arguments */
-	if (argc != 2) {
+	/* if (argc != 2) {
 		printf("usage: %s <fifo>\n", argv[0]);
 		return 1;
-	}
+	}*/
 
 	/* init global variables */
 	evcap = EVENT_ADDEND;
@@ -221,7 +221,6 @@
 				}
 			}
 		}
-		printf("FUCK\n");
 		picoev_set_timeout(loop, fd, 0);
 		return;
 	}
@@ -409,8 +408,11 @@
 		return;
 	} else if (strcmp(cmd, "JOIN") == 0) {
 		if ((strcmp(nick, lnick) != 0)
-		    && (clone_get_user_ids(nick, netid) == NULL))	/* if not clone */
+		    && (clone_get_user_ids(nick, netid) == NULL)) {	/* if not clone */
 			user_add(loop, nick, netid);
+			for (i = 0; i < netlen; i++)
+				picoev_set_timeout(loop, events[networks[i].id].fd, CLONE_COOLDOWN);
+		}
 		return;
 	} else if ((strcmp(cmd, "QUIT") == 0)
 		   || (strcmp(cmd, "PART") == 0)) {