]> jfr.im git - irc/quakenet/newserv.git/blob - trusts_newsearch/formats.c
add my version of trusts, trusts_newsearch, trusts_search modules
[irc/quakenet/newserv.git] / trusts_newsearch / formats.c
1 #include <stdio.h>
2
3 #include "../newsearch/newsearch.h"
4 #include "../control/control.h"
5 #include "../lib/stringbuf.h"
6 #include "../trusts/trusts.h"
7
8 void printtrust_group(searchCtx *ctx, nick *sender, patricia_node_t *node) {
9 trusthost_t *tgh = node->exts[tgh_ext];
10 trustgroup_t *tg;
11
12 if (tgh) {
13 tg = tgh->trustgroup;
14 ctx->reply(sender,"%s | [%lu] | %lu/%lu", IPtostr(node->prefix->sin), tg->id, tg->currenton, tg->maxusage);
15 } else {
16 ctx->reply(sender,"%s | <none>", IPtostr(node->prefix->sin));
17 }
18 }
19