]> jfr.im git - irc/quakenet/newserv.git/blobdiff - newsearch/ns-kick.c
SearchCtx should contain 'type' - this is to make life easier when defining new searc...
[irc/quakenet/newserv.git] / newsearch / ns-kick.c
index 9f4f9355fbdb4626385fc79474f0c887613bb755..7db84c61e2a52121a3ddfc4fd858c3670b382cc4 100644 (file)
@@ -8,14 +8,14 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-void *kick_exe(struct searchNode *thenode, void *theinput);
-void kick_free(struct searchNode *thenode);
+void *kick_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput);
+void kick_free(searchCtx *ctx, struct searchNode *thenode);
 
-struct searchNode *kick_parse(int type, int argc, char **argv) {
+struct searchNode *kick_parse(searchCtx *ctx, int argc, char **argv) {
   struct searchNode *thenode;
   nick *np;
   
-  if (type!=SEARCHTYPE_CHANNEL) {
+  if (ctx->type!=SEARCHTYPE_CHANNEL) {
     parseError="kick: only channel searches are supported";
     return NULL;
   }
@@ -48,7 +48,7 @@ struct searchNode *kick_parse(int type, int argc, char **argv) {
   return thenode;
 }
 
-void *kick_exe(struct searchNode *thenode, void *theinput) {
+void *kick_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) {
   nick *np;
   chanindex *cip;
 
@@ -62,6 +62,6 @@ void *kick_exe(struct searchNode *thenode, void *theinput) {
   return (void *)1;
 }
 
-void kick_free(struct searchNode *thenode) {
+void kick_free(searchCtx *ctx, struct searchNode *thenode) {
   free(thenode);
 }