From: Paul Date: Sat, 30 Aug 2008 16:30:19 +0000 (+0100) Subject: output tree is part of context ;/ X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/commitdiff_plain/7930492294d8212fc67fd949c5d47edd1ef648ec output tree is part of context ;/ --- diff --git a/patriciasearch/patriciasearch.c b/patriciasearch/patriciasearch.c index 0adddcdd..c64b01da 100644 --- a/patriciasearch/patriciasearch.c +++ b/patriciasearch/patriciasearch.c @@ -12,24 +12,13 @@ #include "../lib/strlfunc.h" #include "patriciasearch.h" -CommandTree *pnodeOutputTree; searchCmd *reg_nodesearch; int do_pnodesearch(void *source, int cargc, char **cargv); NodeDisplayFunc defaultpnodefn = printnode; -void regpnodedisp(const char *name, NodeDisplayFunc handler) { - addcommandtotree(pnodeOutputTree, name, 0, 0, (CommandHandler)handler); -} - -void unregpnodedisp(const char *name, NodeDisplayFunc handler) { - deletecommandfromtree(pnodeOutputTree, name, (CommandHandler)handler); -} - void _init() { - pnodeOutputTree=newcommandtree(); - reg_nodesearch = (searchCmd *)registersearchcommand("nodesearch",NO_OPER,do_pnodesearch, printnode); registersearchterm(reg_nodesearch, "users", ps_users_parse, 0, ""); @@ -37,8 +26,6 @@ void _init() { } void _fini() { - destroycommandtree(pnodeOutputTree); - deregistersearchcommand( reg_nodesearch ); } diff --git a/patriciasearch/patriciasearch.h b/patriciasearch/patriciasearch.h index 3655bfdc..638f4257 100644 --- a/patriciasearch/patriciasearch.h +++ b/patriciasearch/patriciasearch.h @@ -12,6 +12,9 @@ int do_pnodesearch_real(replyFunc reply, wallFunc wall, void *source, int cargc, int ast_pnodesearch(searchASTExpr *tree, replyFunc reply, void *sender, wallFunc wall, NodeDisplayFunc display, HeaderFunc header, void *headerarg, int limit); +void regpnodedisp(const char *name, NodeDisplayFunc handler); +void unregpnodedisp(const char *name, NodeDisplayFunc handler); + extern NodeDisplayFunc defaultpnodefn; extern searchCmd *reg_nodesearch;