X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/b76037ebf0c2dbf8860a0899c9051ff589498cba..f33f3f52f58acdd2b9b6796713ac8f24d9881545:/newsearch/ns-modes.c diff --git a/newsearch/ns-modes.c b/newsearch/ns-modes.c index fae58a0b..e676ae10 100644 --- a/newsearch/ns-modes.c +++ b/newsearch/ns-modes.c @@ -8,7 +8,6 @@ #include struct modes_localdata { - int type; flag_t setmodes; flag_t clearmodes; }; @@ -16,7 +15,7 @@ struct modes_localdata { void *modes_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput); void modes_free(searchCtx *ctx, struct searchNode *thenode); -struct searchNode *modes_parse(searchCtx *ctx, int type, int argc, char **argv) { +struct searchNode *modes_parse(searchCtx *ctx, int argc, char **argv) { struct modes_localdata *localdata; struct searchNode *thenode; const flag *flaglist; @@ -26,7 +25,7 @@ struct searchNode *modes_parse(searchCtx *ctx, int type, int argc, char **argv) return NULL; } - switch (type) { + switch (ctx->type) { case SEARCHTYPE_CHANNEL: flaglist=cmodeflags; break; @@ -45,7 +44,6 @@ struct searchNode *modes_parse(searchCtx *ctx, int type, int argc, char **argv) return NULL; } - localdata->type=type; localdata->setmodes=0; localdata->clearmodes = ~0; @@ -77,7 +75,7 @@ void *modes_exe(searchCtx *ctx, struct searchNode *thenode, void *value) { localdata = (struct modes_localdata *)thenode->localdata; - switch (localdata->type) { + switch (ctx->type) { case SEARCHTYPE_CHANNEL: cip=(chanindex *)value; if (!cip->channel)