]> jfr.im git - irc/quakenet/newserv.git/blob - chansearch/chansearch.h
merge
[irc/quakenet/newserv.git] / chansearch / chansearch.h
1 #ifndef __CHANSEARCH_H
2 #define __CHANSEARCH_H
3
4 #include "../parser/parser.h"
5 #include "../channel/channel.h"
6 #include "../nick/nick.h"
7
8 typedef int (*SearchFunc)(chanindex *cip, void *arg);
9 typedef void (*DisplayFunc)(nick *sender, chanindex *cip);
10
11 typedef struct filter {
12 SearchFunc sf; /* Actual search execute function to be filled in by setup func */
13 void *arg; /* Argument for above to be filled in by setup func */
14 int mallocarg; /* This should be set by the setup func if arg was malloc()'d (it will cause arg to be freed at the end) */
15 int invert;
16 } filter;
17
18 /* chansearch.c */
19 void regchansearchfunc(const char *name, int args, CommandHandler handler);
20 void unregchansearchfunc(const char *name, CommandHandler handler);
21 void regchansearchdisp(const char *name, DisplayFunc handler);
22 void unregchansearchdisp(const char *name, DisplayFunc handler);
23
24 #endif