]>
Commit | Line | Data |
---|---|---|
1 | #include <stdio.h> | |
2 | #include "../lib/version.h" | |
3 | #include <../nick/nick.h> | |
4 | #include "../irc/irc.h" | |
5 | #include "trusts.h" | |
6 | ||
7 | MODULE_VERSION(""); | |
8 | ||
9 | int istrusted(nick *np) { | |
10 | return gettrusthost(np) != NULL; | |
11 | } | |
12 | ||
13 | unsigned 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 | } |