From: Gunnar Beutner Date: Wed, 14 Aug 2013 22:00:50 +0000 (+0200) Subject: nickwatch: Fix lostnick hook. X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/commitdiff_plain/9d9385460f814f5a84eae591cd2bb20455644a55 nickwatch: Fix lostnick hook. --- diff --git a/newsearch/newsearch.c b/newsearch/newsearch.c index ccde9c57..c8500f28 100644 --- a/newsearch/newsearch.c +++ b/newsearch/newsearch.c @@ -538,7 +538,7 @@ void nicksearch_exe(struct searchNode *search, searchCtx *ctx) { if (ctx->targets) { np = ((nick **)ctx->targets->content)[k]; if (!np) - break; + continue; } if ((search->exe)(ctx, search, np)) { diff --git a/nickwatch/nickwatch.c b/nickwatch/nickwatch.c index d1895d31..a82ca230 100644 --- a/nickwatch/nickwatch.c +++ b/nickwatch/nickwatch.c @@ -118,11 +118,9 @@ static void nw_hook_lostnick(int hooknum, void *arg) { nwe_clear(np); - for (i = 0; i < nw_pendingnicks.cursi;) + for (i = 0; i < nw_pendingnicks.cursi; i++) if (((nick **)nw_pendingnicks.content)[i] == np) - array_delslot(&nw_pendingnicks, i); - else - i++; + ((nick **)nw_pendingnicks.content)[i] = NULL; } static void nw_hook_rename(int hooknum, void *arg) {