]> jfr.im git - irc/quakenet/newserv.git/blobdiff - newsearch/ns-ident.c
LUA: add function for channel chanop notice
[irc/quakenet/newserv.git] / newsearch / ns-ident.c
index 368a511367bc552948280c38a061f8f616a167d1..825988cda2641f0bd309580d54b4db40f3bb26c4 100644 (file)
@@ -7,17 +7,12 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-void *ident_exe(struct searchNode *thenode, void *theinput);
-void ident_free(struct searchNode *thenode);
+void *ident_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput);
+void ident_free(searchCtx *ctx, struct searchNode *thenode);
 
-struct searchNode *ident_parse(int type, int argc, char **argv) {
+struct searchNode *ident_parse(searchCtx *ctx, int argc, char **argv) {
   struct searchNode *thenode;
 
-  if (type != SEARCHTYPE_NICK) {
-    parseError = "ident: this function is only valid for nick searches.";
-    return NULL;
-  }
-
   if (!(thenode=(struct searchNode *)malloc(sizeof (struct searchNode)))) {
     parseError = "malloc: could not allocate memory for this search.";
     return NULL;
@@ -31,13 +26,13 @@ struct searchNode *ident_parse(int type, int argc, char **argv) {
   return thenode;
 }
 
-void *ident_exe(struct searchNode *thenode, void *theinput) {
+void *ident_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) {
   nick *np = (nick *)theinput;
 
   return np->ident;
 }
 
-void ident_free(struct searchNode *thenode) {
+void ident_free(searchCtx *ctx, struct searchNode *thenode) {
   free(thenode);
 }