summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-16 12:47:09 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-16 12:47:09 +0000
commitc07c9729f37becb33900a9ff8b0b08ee1e8648a1 (patch)
tree2bf151a5b9de3ba6f9ee02cf84d3b7af995ff5da
parentf5754cbc9c77387adafc6c58b5d46ffa9b5facd3 (diff)
Moved serverstats* stats to InspIRCd class
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2528 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/inspircd.h2
-rw-r--r--src/inspircd.cpp28
2 files changed, 17 insertions, 13 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index 9ed1b0468..bf096272b 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -109,7 +109,9 @@ class InspIRCd
ModeParser* ModeGrok;
CommandParser* Parser;
SocketEngine* SE;
+ serverstats* stats;
+ void MakeLowerMap()
std::string GetRevision();
std::string GetVersionString();
char* ModuleError();
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();