]> jfr.im git - irc/quakenet/newserv.git/blame_incremental - trusts/trusts_api.c
CHANSERV: tell user when they can't attempts to auth any more, and drop max attempts...
[irc/quakenet/newserv.git] / trusts / trusts_api.c
... / ...
CommitLineData
1#include <stdio.h>
2#include "../lib/version.h"
3#include <../nick/nick.h>
4#include "../irc/irc.h"
5#include "trusts.h"
6
7MODULE_VERSION("");
8
9int istrusted(nick *np) {
10 return gettrusthost(np) != NULL;
11}
12
13unsigned char getnodebits(struct irc_in_addr *ip) {
14 trusthost *th;
15
16 th = th_getbyhost(ip);
17
18 if(th)
19 return th->nodebits;
20
21 if(irc_in_addr_is_ipv4(ip))
22 return 128;
23 else
24 return 64;
25}