X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/798a53a27e24f354d6ec78317467b998302cd0b0..8855bb48b449ed06cfd3ce528b3c0a77c37cb24b:/newsearch/ns-ident.c diff --git a/newsearch/ns-ident.c b/newsearch/ns-ident.c index 368a5113..825988cd 100644 --- a/newsearch/ns-ident.c +++ b/newsearch/ns-ident.c @@ -7,17 +7,12 @@ #include #include -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); }