]> jfr.im git - irc/quakenet/newserv.git/blobdiff - trusts/trusts_api.c
Integrate glinebynick/glinebyhost into other modules.
[irc/quakenet/newserv.git] / trusts / trusts_api.c
index fff5f53e096cb35ef6d99f700d3b603deee97bc0..b6d3f16703eb9b12e6e8311a4cbb3027d32d2068 100644 (file)
@@ -32,3 +32,17 @@ int trustungline(trustgroup *tg, const char *ident, int duration, const char *re
 
   return count;
 }
+
+unsigned char getnodebits(struct irc_in_addr *ip) {
+  trusthost *th;
+
+  th = th_getbyhost(ip);
+
+  if(th)
+    return th->nodebits;
+
+  if(irc_in_addr_is_ipv4(ip))
+    return 128;
+  else
+    return 64;
+}