]> jfr.im git - irc/quakenet/newserv.git/blame - trusts_newsearch/formats.c
trustscommands as seperate module
[irc/quakenet/newserv.git] / trusts_newsearch / formats.c
CommitLineData
e2527cba
P
1#include <stdio.h>
2
3#include "../newsearch/newsearch.h"
4#include "../control/control.h"
5#include "../lib/stringbuf.h"
9a8ffb84 6#include "../trusts2/trusts.h"
e2527cba
P
7
8void 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