void nickstats(int hooknum, void *arg);
+char *NULLAUTHNAME = "";
+
void _init() {
unsigned int i;
authname *anp;
initnickhelpers();
memset(nicktable,0,sizeof(nicktable));
memset(servernicks,0,sizeof(servernicks));
+
+ /* If we're connected to IRC, force a disconnect. This needs to be done
+ * before we register all our hooks which would otherwise get called
+ * during the disconnect. */
+ if (connected) {
+ irc_send("%s SQ %s 0 :Resync [adding nick support]",mynumeric->content,myserver->content); irc_disconnected();
+ }
/* Register our hooks */
registerhook(HOOK_SERVER_NEWSERVER,&handleserverchange);
freesstring(np->shident);
freesstring(np->sethost);
freesstring(np->opername);
- if(!np->auth && np->authname)
+ if(!np->auth && np->authname && (np->authname != NULLAUTHNAME))
free(np->authname);
}
}
if(IsAccount(np)) {
if(!np->auth) {
- if(np->authname)
+ if(np->authname && (np->authname != NULLAUTHNAME))
free(np->authname);
} else {
np->auth->usercount--;