]> jfr.im git - irc/quakenet/newserv.git/blobdiff - newsearch/ns-name.c
newsearch changes to support addition of trust_search/patriciasearch
[irc/quakenet/newserv.git] / newsearch / ns-name.c
index 5e07404732b9a93772f586c541a9e3bd3f70a1e6..2b5abc49af0aafcc363565828ef2b39ae6b0c00f 100644 (file)
@@ -7,17 +7,12 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-void *name_exe(struct searchNode *thenode, void *theinput);
-void name_free(struct searchNode *thenode);
+void *name_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput);
+void name_free(searchCtx *ctx, struct searchNode *thenode);
 
-struct searchNode *name_parse(int type, int argc, char **argv) {
+struct searchNode *name_parse(searchCtx *ctx, int argc, char **argv) {
   struct searchNode *thenode;
 
-  if (type != SEARCHTYPE_CHANNEL) {
-    parseError = "name: this function is only valid for channel searches.";
-    return NULL;
-  }
-
   if (!(thenode=(struct searchNode *)malloc(sizeof(struct searchNode)))) {
     /* couldn't malloc() memory for thenode, so free localdata to avoid leakage */
     parseError = "malloc: could not allocate memory for this search.";
@@ -32,13 +27,13 @@ struct searchNode *name_parse(int type, int argc, char **argv) {
   return thenode;
 }
 
-void *name_exe(struct searchNode *thenode, void *theinput) {
+void *name_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) {
   chanindex *cip = (chanindex *)theinput;
 
   return cip->name->content;
 }
 
-void name_free(struct searchNode *thenode) {
+void name_free(searchCtx *ctx, struct searchNode *thenode) {
   free(thenode);
 }