X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/798a53a27e24f354d6ec78317467b998302cd0b0..40814391c7b017da05d4daa2895093e5099801c7:/newsearch/ns-realname.c diff --git a/newsearch/ns-realname.c b/newsearch/ns-realname.c index e39734e6..e5582444 100644 --- a/newsearch/ns-realname.c +++ b/newsearch/ns-realname.c @@ -7,17 +7,12 @@ #include #include -void *realname_exe(struct searchNode *thenode, void *theinput); -void realname_free(struct searchNode *thenode); +void *realname_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput); +void realname_free(searchCtx *ctx, struct searchNode *thenode); -struct searchNode *realname_parse(int type, int argc, char **argv) { +struct searchNode *realname_parse(searchCtx *ctx, int argc, char **argv) { struct searchNode *thenode; - if (type != SEARCHTYPE_NICK) { - parseError = "realname: 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 *realname_parse(int type, int argc, char **argv) { return thenode; } -void *realname_exe(struct searchNode *thenode, void *theinput) { +void *realname_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) { nick *np = (nick *)theinput; return np->realname->name->content; } -void realname_free(struct searchNode *thenode) { +void realname_free(searchCtx *ctx, struct searchNode *thenode) { free(thenode); }