- if (((unsigned)TIME > (unsigned)curr->timeout) && (curr->registered != REG_ALL))
- {
- this->Log(DEBUG,"InspIRCd: registration timeout: %s",curr->nick);
- //ZapThisDns(curr->fd);
- GlobalGoners.AddItem(curr,"Registration timeout");
- continue;
- }
- /*
- * user has signed on with USER/NICK/PASS, and dns has completed, all the modules
- * say this user is ok to proceed, fully connect them.
- */
- if ((TIME > curr->signon) && (curr->registered == REG_NICKUSER) && (AllModulesReportReady(curr)))
- {
- curr->dns_done = true;
- //ZapThisDns(curr->fd);
- this->stats->statsDnsBad++;
- curr->FullConnect(&GlobalGoners);
- continue;
- }
- if ((curr->dns_done) && (curr->registered == REG_NICKUSER) && (AllModulesReportReady(curr)))
- {
- this->Log(DEBUG,"dns done, registered=3, and modules ready, OK");
- curr->FullConnect(&GlobalGoners);
- //ZapThisDns(curr->fd);
- continue;
- }
- // It's time to PING this user. Send them a ping.
- if ((TIME > curr->nping) && (curr->registered == REG_ALL))
- {
- // This user didn't answer the last ping, remove them
- if (!curr->lastping)
- {
- GlobalGoners.AddItem(curr,"Ping timeout");
- curr->lastping = 1;
- curr->nping = TIME+curr->pingmax;
- continue;
- }
- curr->Write("PING :%s",this->Config->ServerName);
- curr->lastping = 0;
- curr->nping = TIME+curr->pingmax;
- }
-
- /*
- * We can flush the write buffer as the last thing we do, because if they
- * match any of the above conditions its no use flushing their buffer anyway.
- */
-
- curr->FlushWriteBuf();
- if (*curr->GetWriteError())
- {
- GlobalGoners.AddItem(curr,curr->GetWriteError());
- continue;
- }