]> jfr.im git - irc/quakenet/newserv.git/blobdiff - newsearch/ns-any.c
CHANSERV: fix issue where chanserv_relay doesn't wait for db to be loaded before...
[irc/quakenet/newserv.git] / newsearch / ns-any.c
index ff780c940dc033db90c9418c48a3eb0f37ec4171..289b9589f299423cc7795abb29b90ba2f8fc5108 100644 (file)
@@ -66,7 +66,7 @@ void any_free(searchCtx *ctx, struct searchNode *thenode) {
   struct any_localdata *localdata = thenode->localdata;
   
   if(localdata->hitlimit)
-    ctx->reply(senderNSExtern, "Warning: your expression hit the maximum iteration count and was terminated early.");
+    ctx->reply(senderNSExtern, "Warning: your expression was terminated for %d nicks as it hit the maximum iteration count.", localdata->hitlimit);
   
   (localdata->genfn->free)(ctx, localdata->genfn);
   (localdata->lambdafn->free)(ctx, localdata->lambdafn);
@@ -79,8 +79,9 @@ void *any_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) {
   struct any_localdata *localdata = thenode->localdata;
   int i;
 
-  if(localdata->hitlimit)
+/*  if(localdata->hitlimit)
     return (void *)0;
+*/
 
   for(i=0;i<MAX_ITERATIONS;i++) {
     if(!(localdata->genfn->exe)(ctx, localdata->genfn, theinput))
@@ -90,6 +91,6 @@ void *any_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) {
       return (void *)1;
   }
   
-  localdata->hitlimit = 1;
+  localdata->hitlimit++;
   return (void *)0;
 }