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