]>
jfr.im git - irc/quakenet/newserv.git/blob - proxyscan/pns-scan.c
5 #include "../newsearch/newsearch.h"
10 void *pscan_exe(searchCtx
*ctx
, struct searchNode
*thenode
, void *theinput
);
11 void pscan_free(searchCtx
*ctx
, struct searchNode
*thenode
);
13 struct searchNode
*pscan_parse(searchCtx
*ctx
, int argc
, char **argv
) {
14 struct searchNode
*thenode
;
16 if (!(thenode
=(struct searchNode
*)malloc(sizeof (struct searchNode
)))) {
17 parseError
= "malloc: could not allocate memory for this search.";
21 thenode
->returntype
= RETURNTYPE_BOOL
;
22 thenode
->exe
= pscan_exe
;
23 thenode
->free
= pscan_free
;
24 thenode
->localdata
= (void *)0;
29 void *pscan_exe(searchCtx
*ctx
, struct searchNode
*thenode
, void *theinput
) {
30 startnickscan((nick
*)theinput
);
31 thenode
->localdata
= (void *)((int)thenode
->localdata
+ 1);
35 void pscan_free(searchCtx
*ctx
, struct searchNode
*thenode
) {
36 ctx
->reply(senderNSExtern
, "proxyscan now scanning: %d nick(s).", (int)thenode
->localdata
);