struct nick_localdata {
nick *np;
- int type;
};
void *nick_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput);
void nick_free(searchCtx *ctx, struct searchNode *thenode);
-struct searchNode *nick_parse(searchCtx *ctx, int type, int argc, char **argv) {
+struct searchNode *nick_parse(searchCtx *ctx, int argc, char **argv) {
struct nick_localdata *localdata;
struct searchNode *thenode;
return NULL;
}
- switch (type) {
+ switch (ctx->type) {
case SEARCHTYPE_CHANNEL:
if (argc!=1) {
parseError="nick: usage: (nick target)";
free(localdata);
return NULL;
}
- localdata->type = type;
break;
case SEARCHTYPE_NICK:
free(localdata);
return NULL;
}
- localdata->type = type;
localdata->np = NULL;
break;
return NULL;
}
- if (type == SEARCHTYPE_CHANNEL)
+ if (ctx->type == SEARCHTYPE_CHANNEL)
thenode->returntype = RETURNTYPE_BOOL;
else
thenode->returntype = RETURNTYPE_STRING;
localdata = thenode->localdata;
- switch (localdata->type) {
+ switch (ctx->type) {
case SEARCHTYPE_CHANNEL:
cip = (chanindex *)theinput;