+ patricia_node_t *head, *node;
+ int i, nodecount = 0;
+ patricianick_t *pnp;
+ nick *npp;
+
+ head = refnode(iptree, &ipaddress_canonical, th->nodebits);
+ nodecount = head->usercount;
+
+ /* Account for borrowed IP addresses. */
+ PATRICIA_WALK(head, node) {
+ pnp = node->exts[pnode_ext];
+
+ if (pnp)
+ for (i = 0; i < PATRICIANICK_HASHSIZE; i++)
+ for (npp = pnp->identhash[i]; npp; npp=npp->exts[pnick_ext])
+ if (NickOnServiceServer(npp))
+ usercountadjustment--;
+ }
+ PATRICIA_WALK_END;