diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-16 12:47:09 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-16 12:47:09 +0000 |
commit | c07c9729f37becb33900a9ff8b0b08ee1e8648a1 (patch) | |
tree | 2bf151a5b9de3ba6f9ee02cf84d3b7af995ff5da /src/inspircd.cpp | |
parent | f5754cbc9c77387adafc6c58b5d46ffa9b5facd3 (diff) |
Moved serverstats* stats to InspIRCd class
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2528 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index e787da5ae..0b9c5f975 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -89,7 +89,6 @@ SocketEngine* SE = NULL; // by an integer, meaning there is no need for a scan/search operation. userrec* fd_ref_table[65536]; -serverstats* stats = new serverstats; Server* MyServer = new Server; ServerConfig *Config = new ServerConfig; @@ -138,7 +137,19 @@ std::string InspIRCd::GetRevision() return single; } - +void InspIRCd::MakeLowerMap() +{ + // initialize the lowercase mapping table + for (unsigned int cn = 0; cn < 256; cn++) + lowermap[cn] = cn; + // lowercase the uppercase chars + for (unsigned int cn = 65; cn < 91; cn++) + lowermap[cn] = tolower(cn); + // now replace the specific chars for scandanavian comparison + lowermap[(unsigned)'['] = '{'; + lowermap[(unsigned)']'] = '}'; + lowermap[(unsigned)'\\'] = '|'; +} InspIRCd::InspIRCd(int argc, char** argv) { @@ -170,18 +181,8 @@ InspIRCd::InspIRCd(int argc, char** argv) } strlcpy(Config->MyExecutable,argv[0],MAXBUF); - - // initialize the lowercase mapping table - for (unsigned int cn = 0; cn < 256; cn++) - lowermap[cn] = cn; - // lowercase the uppercase chars - for (unsigned int cn = 65; cn < 91; cn++) - lowermap[cn] = tolower(cn); - // now replace the specific chars for scandanavian comparison - lowermap[(unsigned)'['] = '{'; - lowermap[(unsigned)']'] = '}'; - lowermap[(unsigned)'\\'] = '|'; + this->MakeLowerMap(); OpenLog(argv, argc); Config->ClearStack(); @@ -189,6 +190,7 @@ InspIRCd::InspIRCd(int argc, char** argv) CheckRoot(); this->ModeGrok = new ModeParser(); this->Parser = new CommandParser(); + this->stats = new serverstats(); AddServerName(Config->ServerName); CheckDie(); stats->BoundPortCount = BindPorts(); |