th->parent = NULL;
th->children = NULL;
+ th->marker = 0;
+
th->next = tg->hosts;
tg->hosts = th;
tg->lastmaxuserreset = lastmaxuserreset;
tg->hosts = NULL;
+ tg->marker = 0;
+
tg->count = 0;
memset(tg->exts, 0, sizeof(tg->exts));
trusts_newnick(np, 1);
}
}
+
+unsigned int nexttgmarker(void) {
+ static unsigned int tgmarker = 0;
+ trustgroup *tg;
+
+ tgmarker++;
+ if(!tgmarker) {
+ /* If we wrapped to zero, zap the marker on all groups */
+ for(tg=tglist;tg;tg=tg->next)
+ tg->marker=0;
+
+ tgmarker++;
+ }
+
+ return tgmarker;
+}
+
+unsigned int nextthmarker(void) {
+ static unsigned int thmarker = 0;
+ trustgroup *tg;
+ trusthost *th;
+
+ thmarker++;
+ if(!thmarker) {
+ /* If we wrapped to zero, zap the marker on all hosts */
+ for(tg=tglist;tg;tg=tg->next)
+ for(th=tg->hosts;th;th=th->next)
+ th->marker=0;
+
+ thmarker++;
+ }
+
+ return thmarker;
+}