From f9bc7a311d4a9d7b6eb581c21d2105b692b42b8d Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 14 Dec 2005 17:40:06 +0000 Subject: Made inspircd itself a class, and called its instance TittyBiscuits, just because. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2425 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 0da0f580c..60e0c11bd 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -428,7 +428,7 @@ void kill_link_silent(userrec *user,const char* r) } -int main(int argc, char** argv) +InspIRCd::InspIRCd(int argc, char** argv) { Start(); srand(time(NULL)); @@ -468,14 +468,7 @@ int main(int argc, char** argv) lowermap[(unsigned)']'] = '}'; lowermap[(unsigned)'\\'] = '|'; - if (InspIRCd(argv,argc) == ERROR) - { - log(DEFAULT,"main: daemon function bailed"); - printf("ERROR: could not initialise. Shutting down.\n"); - Exit(ERROR); - } - Exit(TRUE); - return 0; + return; } template inline string ConvToStr(const T &in) @@ -1543,7 +1536,7 @@ int BindPorts() return boundPortCount; } -int InspIRCd(char** argv, int argc) +int InspIRCd::Run() { bool expire_run = false; std::vector activefds; @@ -1753,3 +1746,17 @@ int InspIRCd(char** argv, int argc) return 0; } +/**********************************************************************************/ + +/** + * An ircd in four lines! bwahahaha. ahahahahaha. ahahah *cough*. + */ + +int main(int argc, char** argv) +{ + InspIRCd TittyBiscuits = new InspIRCd(argc, argv); + TittyBiscuits->Run(); + delete TittyBiscuits; + return 0; +} + -- cgit v1.2.3