]> jfr.im git - irc/quakenet/newserv.git/blobdiff - newsearch/ns-authid.c
merge
[irc/quakenet/newserv.git] / newsearch / ns-authid.c
index 7c4a1d46ca4db7e5cc98399d3346ac7b1ba4c222..184a4a954b611a26c1b2c697a2f81a57a7ece116 100644 (file)
@@ -7,17 +7,12 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-void *authid_exe(struct searchNode *thenode, void *theinput);
-void authid_free(struct searchNode *thenode);
+void *authid_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput);
+void authid_free(searchCtx *ctx, struct searchNode *thenode);
 
-struct searchNode *authid_parse(int type, int argc, char **argv) {
+struct searchNode *authid_parse(searchCtx *ctx, int argc, char **argv) {
   struct searchNode *thenode;
 
-  if (type != SEARCHTYPE_NICK) {
-    parseError = "authid: 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,7 +26,7 @@ struct searchNode *authid_parse(int type, int argc, char **argv) {
   return thenode;
 }
 
-void *authid_exe(struct searchNode *thenode, void *theinput) {
+void *authid_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) {
   nick *np = (nick *)theinput;
 
   if (IsAccount(np) && np->auth)
@@ -41,6 +36,6 @@ void *authid_exe(struct searchNode *thenode, void *theinput) {
 
 }
 
-void authid_free(struct searchNode *thenode) {
+void authid_free(searchCtx *ctx, struct searchNode *thenode) {
   free(thenode);
 }