diff options
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index a96e16c45..31219b410 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -695,7 +695,7 @@ int InspIRCd::Run() * An ircd in four lines! bwahahaha. ahahahahaha. ahahah *cough*. */ -int main(int argc, char** argv) +int ircd(int argc, char ** argv) { SI = new InspIRCd(argc, argv); mysig = &SI->s_signal; @@ -704,6 +704,23 @@ int main(int argc, char** argv) return 0; } +#ifdef WINDOWS + +int main(int argc, char ** argv) +{ + __try { + ircd(argc,argv); + } __except(__exceptionHandler(GetExceptionInformation())) {} + return 0; +} + +#else +int main(int argc, char** argv) +{ + return ircd(argc,argv); +} +#endif + /* this returns true when all modules are satisfied that the user should be allowed onto the irc server * (until this returns true, a user will block in the waiting state, waiting to connect up to the * registration timeout maximum seconds) |