/* Close all client sockets, or the new process inherits them */
for (std::vector<User*>::const_iterator i = this->Users->local_users.begin(); i != this->Users->local_users.end(); i++)
{
- (*i)->SetWriteError("Server shutdown");
+ this->Users->QuitUser((*i), "Server shutdown");
(*i)->CloseSocket();
}
int j = 1;
for (FailedPortList::iterator i = pl.begin(); i != pl.end(); i++, j++)
{
- printf("%d.\tIP: %s\tPort: %lu\n", j, i->first.empty() ? "<all>" : i->first.c_str(), (unsigned long)i->second);
+ printf("%d.\tAddress: %s\tReason: %s\n", j, i->first.empty() ? "<all>" : i->first.c_str(), i->second.c_str());
}
}
*/
if (TIME != OLDTIME)
{
- if (TIME < OLDTIME)
+ /* Allow a buffer of two seconds drift on this so that ntpdate etc dont harass admins */
+ if (TIME < OLDTIME - 2)
{
SNO->WriteToSnoMask('d', "\002EH?!\002 -- Time is flowing BACKWARDS in this dimension! Clock drifted backwards %lu secs.", (unsigned long)OLDTIME-TIME);
}
- else if (TIME != OLDTIME + 1)
+ else if (TIME > OLDTIME + 2)
{
SNO->WriteToSnoMask('d', "\002EH?!\002 -- Time is jumping FORWARDS! Clock skipped %lu secs.", (unsigned long)TIME - OLDTIME);
}
* An ircd in five lines! bwahahaha. ahahahahaha. ahahah *cough*.
*/
-int main(int argc, char ** argv)
+ENTRYPOINT
{
SI = new InspIRCd(argc, argv);
mysig = &SI->s_signal;