]> jfr.im git - irc/quakenet/newserv.git/blobdiff - trusts/events.c
CHANSERV: tell user when they can't attempts to auth any more, and drop max attempts...
[irc/quakenet/newserv.git] / trusts / events.c
index 07e9a851a8d4fa67aa1490bd8a1b019708243aeb..7f716e802e9aaef6595531376f191e9f3b0a225a 100644 (file)
@@ -1,4 +1,5 @@
 #include "../core/hooks.h"
+#include "../irc/irc.h"
 #include "trusts.h"
 
 static void __counthandler(int hooknum, void *arg);
@@ -8,7 +9,7 @@ void trusts_newnick(nick *sender, int moving) {
   void *arg[2];
   struct irc_in_addr ipaddress;
 
-  ip_canonicalize_6to4(&ipaddress, &sender->p_ipaddr);
+  ip_canonicalize_tunnel(&ipaddress, &sender->ipaddress);
 
   th = th_getbyhost(&ipaddress);
 
@@ -18,7 +19,6 @@ void trusts_newnick(nick *sender, int moving) {
   } else {
     setnextbytrust(sender, th->users);
     th->users = sender;
-    setipnodebits(sender, th->nodebits);
   }
 
   arg[0] = sender;
@@ -72,7 +72,7 @@ static void __lostnick(int hooknum, void *arg) {
 }
 
 static void __counthandler(int hooknum, void *arg) {
-  time_t t = time(NULL);
+  time_t t = getnettime();
   void **args = arg;
   trusthost *th = gettrusthost((nick *)args[0]);
   trustgroup *tg;