]>
jfr.im git - irc/quakenet/newserv.git/blob - trusts_newsearch/tsns-currenton.c
1 #include "trusts_newsearch.h"
6 void *tsns_tgcurrenton_exe(searchCtx
*ctx
, struct searchNode
*thenode
, void *theinput
);
7 void tsns_tgcurrenton_free(searchCtx
*ctx
, struct searchNode
*thenode
);
9 struct searchNode
*tsns_tgcurrenton_parse(searchCtx
*ctx
, int argc
, char **argv
) {
10 struct searchNode
*thenode
;
12 if (!(thenode
=(struct searchNode
*)malloc(sizeof (struct searchNode
)))) {
13 parseError
= "malloc: could not allocate memory for this search.";
17 thenode
->returntype
= RETURNTYPE_INT
;
18 thenode
->localdata
= NULL
;
19 thenode
->exe
= tsns_tgcurrenton_exe
;
20 thenode
->free
= tsns_tgcurrenton_free
;
25 void *tsns_tgcurrenton_exe(searchCtx
*ctx
, struct searchNode
*thenode
, void *theinput
) {
28 tg
= (trustgroup_t
*)theinput
;
29 return (void *)(tg
->currenton
);
32 void tsns_tgcurrenton_free(searchCtx
*ctx
, struct searchNode
*thenode
) {