]> jfr.im git - irc/quakenet/newserv.git/blobdiff - localuser/localuser.c
patricia trie changes
[irc/quakenet/newserv.git] / localuser / localuser.c
index 12b97dd9fc5d398a55acec879b20f7caf332f587..94062d0429a2e2d174d4f313e4ef0fe0807e7e01 100644 (file)
@@ -109,7 +109,7 @@ nick *registerlocaluserwithuseridflags(char *nickname, char *ident, char *host,
   ((unsigned char *)(ipaddress.in6_16))[15] = (currentlocalunum%253)+1;
 
   newuser->ipnode = refnode(iptree, &ipaddress, PATRICIA_MAXBITS);
-  newuser->ipnode->usercount++;
+  node_increment_usercount(newuser->ipnode);
 
   newuser->timestamp=getnettime();
   newuser->shident=NULL;
@@ -553,7 +553,7 @@ void checkpendingkills(int hooknum, void *arg) {
 }
 
 /* Auth user */
-void localusersetaccountwithuseridflags(nick *np, char *accname, unsigned long accid, flag_t accountflags) {
+void localusersetaccountwithuseridflagsts(nick *np, char *accname, unsigned long accid, flag_t accountflags, time_t authTS) {
   if (IsAccount(np)) {
     Error("localuser",ERR_WARNING,"Tried to set account on user %s already authed", np->nick);
     return;
@@ -562,7 +562,7 @@ void localusersetaccountwithuseridflags(nick *np, char *accname, unsigned long a
   SetAccount(np);
   strncpy(np->authname, accname, ACCOUNTLEN);
   np->authname[ACCOUNTLEN]='\0';
-  np->accountts=getnettime();
+  np->accountts=authTS?authTS:getnettime();
   np->accountflags=accountflags;
 
   if (accid) {