X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/8cce37d6df04bdf77b022b1c51abf4a472dba2c0..8855bb48b449ed06cfd3ce528b3c0a77c37cb24b:/newsearch/ns-authid.c?ds=sidebyside diff --git a/newsearch/ns-authid.c b/newsearch/ns-authid.c index 7c4a1d46..184a4a95 100644 --- a/newsearch/ns-authid.c +++ b/newsearch/ns-authid.c @@ -7,17 +7,12 @@ #include #include -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); }