#include <stdio.h>
#include <stdlib.h>
-void *services_exe(struct searchNode *thenode, void *theinput);
-void services_free(struct searchNode *thenode);
+void *services_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput);
+void services_free(searchCtx *ctx, struct searchNode *thenode);
-struct searchNode *services_parse(int type, int argc, char **argv) {
+struct searchNode *services_parse(searchCtx *ctx, int argc, char **argv) {
struct searchNode *thenode;
- if (type != SEARCHTYPE_CHANNEL) {
- parseError = "services: this function is only valid for channel searches.";
- return NULL;
- }
-
if (!(thenode=(struct searchNode *)malloc(sizeof(struct searchNode)))) {
/* couldn't malloc() memory for thenode, so free localdata to avoid leakage */
parseError = "malloc: could not allocate memory for this search.";
return thenode;
}
-void *services_exe(struct searchNode *thenode, void *theinput) {
+void *services_exe(searchCtx *ctx, struct searchNode *thenode, void *theinput) {
chanindex *cip = (chanindex *)theinput;
nick *np;
int i;
return (void *)count;
}
-void services_free(struct searchNode *thenode) {
+void services_free(searchCtx *ctx, struct searchNode *thenode) {
free(thenode);
}