- if (curr->sendq.empty())
- curr->OverPenalty = false;
- }
-
- if ((curr->registered != REG_ALL) && (TIME > curr->timeout))
- {
- /*
- * registration timeout -- didnt send USER/NICK/HOST
- * in the time specified in their connection class.
- */
- curr->muted = true;
- User::QuitUser(this, curr, "Registration timeout");
- continue;
- }
-
- /*
- * `ready` means that the user has provided NICK/USER(/PASS), and all modules agree
- * that the user is okay to proceed. The one thing we are then waiting for is DNS, which we do here...
- */
- bool ready = ((curr->registered == REG_NICKUSER) && AllModulesReportReady(curr));
+ case REG_ALL:
+ if (TIME > curr->nping)
+ {
+ // This user didn't answer the last ping, remove them
+ if (!curr->lastping)
+ {
+ time_t time = this->Time() - (curr->nping - curr->MyClass->GetPingTime());
+ char message[MAXBUF];
+ snprintf(message, MAXBUF, "Ping timeout: %ld second%s", (long)time, time > 1 ? "s" : "");
+ curr->lastping = 1;
+ curr->nping = TIME + curr->MyClass->GetPingTime();
+ this->Users->QuitUser(curr, message);
+ continue;
+ }