]>
jfr.im git - irc/quakenet/newserv.git/blob - newsearch/ns-channels.c
2 * CHANNELS functionality
10 #include "../irc/irc_config.h"
11 #include "../lib/irc_string.h"
13 void *channels_exe(searchCtx
*ctx
, struct searchNode
*thenode
, void *theinput
);
14 void channels_free(searchCtx
*ctx
, struct searchNode
*thenode
);
16 struct searchNode
*channels_parse(searchCtx
*ctx
, int argc
, char **argv
) {
17 struct searchNode
*thenode
;
19 if (!(thenode
=(struct searchNode
*)malloc(sizeof (struct searchNode
)))) {
20 parseError
= "malloc: could not allocate memory for this search.";
24 thenode
->returntype
= RETURNTYPE_INT
;
25 thenode
->localdata
= NULL
;
26 thenode
->exe
= channels_exe
;
27 thenode
->free
= channels_free
;
32 void *channels_exe(searchCtx
*ctx
, struct searchNode
*thenode
, void *theinput
) {
33 nick
*np
= (nick
*)theinput
;
35 return (void *)(long)np
->channels
->cursi
;
38 void channels_free(searchCtx
*ctx
, struct searchNode
*thenode
) {