((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;
}
/* 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;
SetAccount(np);
strncpy(np->authname, accname, ACCOUNTLEN);
np->authname[ACCOUNTLEN]='\0';
- np->accountts=getnettime();
+ np->accountts=authTS?authTS:getnettime();
np->accountflags=accountflags;
if (accid) {