nick *np = (nick *)arg;
rq_fasttrack *ft;
+ np->exts[rqnext] = NULL;
+
/* Auth might be null for the newnick hook. */
if(!np->auth)
return;
}
static void rq_cleanup_fasttrack(void *arg) {
- time_t now = getnettime();
+ time_t now;
rq_fasttrack **pft, *ft;
int j;
nick *tnp;
now = getnettime();
- pft = &ftlist;
-
- for(ft=*pft;pft && *pft;pft=&((*pft)->next)) {
+ for(pft=&ftlist;*pft;pft=&((*pft)->next)) {
int foundnick = 0;
+ ft = *pft;
+
for(j=0;j<NICKHASHSIZE && !foundnick;j++) {
for(tnp=nicktable[j];tnp;tnp=tnp->next) {
if(tnp->exts[rqnext]==ft) {
}
}
- if(ft->refill_time < now) {
+ if(!foundnick && ft->refill_time < now) {
*pft = ft->next;
free(ft);
}
+
+ if (!*pft)
+ break;
}
}