X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/0eb4cbd3de4d8b52dbdba7ba715b2d81db6f2f60..3e1b768066a16c4b899b9cbdd7911be883151a05:/newsearch/ns-gline.c diff --git a/newsearch/ns-gline.c b/newsearch/ns-gline.c index 9af34718..f989633d 100644 --- a/newsearch/ns-gline.c +++ b/newsearch/ns-gline.c @@ -146,7 +146,7 @@ void *gline_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) { if (ctx->searchcmd == reg_nicksearch) np->marker = localdata->marker; else { - ww = np->next; + ww = (whowas *)np->next; ww->marker = localdata->marker; } localdata->count++; @@ -215,9 +215,14 @@ void gline_free(searchCtx *ctx, struct searchNode *thenode) { } } } else { - for (ww = whowas_head; ww; ww = ww->next) { + for (i = whowasoffset; i < whowasoffset + whowasmax; i++) { + ww = &whowasrecs[i % whowasmax]; + + if (ww->type == WHOWAS_UNUSED) + continue; + if (ww->marker == localdata->marker) { - if(!glineuser(&gbuf, ww->nick, localdata, ti)) + if(!glineuser(&gbuf, &ww->nick, localdata, ti)) safe++; } }