ticl

tiny irc channel linker
git clone git://git.ircforever.org/ticl
Log | Files | Refs | Submodules | README | LICENSE

commit 8cdec92600494e5d844cb79e25d95215cda12f8a
parent 8d0c143cd5f978544806f8b58bcefc22aef92cb5
Author: libredev <libredev@ircforever.org>
Date:   Fri, 25 Nov 2022 11:13:07 +0530

fixed user's JOIN

Diffstat:
Mmain.c | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/main.c b/main.c @@ -98,10 +98,10 @@ main(int argc, char *argv[]) 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 @@ server_event_cb(picoev_loop *loop, int fd, int revents, void *cb_arg) } } } - printf("FUCK\n"); picoev_set_timeout(loop, fd, 0); return; } @@ -409,8 +408,11 @@ server_event_cb(picoev_loop *loop, int fd, int revents, void *cb_arg) 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)) {