X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspircd.cpp;h=e2ed1282ceab55bfc111c3d18498aef0369925ac;hb=2fdfbe85d38ee2f83e86c67f94af2e7e7efb3b9f;hp=72214dd1e22423e27973c4f021645f6e0598f8da;hpb=f5dec3851486de3129bebbdbabecffc40cf182ac;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 72214dd1e..e2ed1282c 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -95,7 +95,7 @@ void InspIRCd::Cleanup() /* Close all client sockets, or the new process inherits them */ for (std::vector::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(); } @@ -679,7 +679,7 @@ InspIRCd::InspIRCd(int argc, char** argv) 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() ? "" : i->first.c_str(), (unsigned long)i->second); + printf("%d.\tAddress: %s\tReason: %s\n", j, i->first.empty() ? "" : i->first.c_str(), i->second.c_str()); } } @@ -788,11 +788,12 @@ int InspIRCd::Run() */ 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); } @@ -866,7 +867,7 @@ void InspIRCd::BufferedSocketCull() * 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;