summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-01 14:56:33 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-01 14:56:33 +0000
commit55de6781e0d26c304e7d1bfa7c84698183c14228 (patch)
treebdbb3fb55f147ef8e48f9cdb032021f1187a1e41
parent903dbea2b1c4072fcd4538bf67feaf1cf968bac9 (diff)
Move SetSignals(), Start() and DaemonSeed() into private methods of class InspIRCd, move MakeLowerMap() into private: section
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4096 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/inspircd.h10
-rw-r--r--src/inspircd.cpp12
2 files changed, 11 insertions, 11 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index 962dd1c86..9a0561f93 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -87,6 +87,10 @@ class InspIRCd
void erase_module(int j);
void BuildISupport();
void MoveTo(std::string modulename,int slot);
+ void Start();
+ void SetSignals();
+ bool DaemonSeed();
+ void MakeLowerMap();
public:
time_t startup_time;
@@ -95,7 +99,6 @@ class InspIRCd
SocketEngine* SE;
serverstats* stats;
- void MakeLowerMap();
std::string GetRevision();
std::string GetVersionString();
char* ModuleError();
@@ -112,10 +115,7 @@ class InspIRCd
};
/* Miscellaneous stuff here, moved from inspircd_io.h */
-void Exit(int status);
-void Start();
-void SetSignals();
-bool DaemonSeed();
+void Exit(int status);
void WritePID(const std::string &filename);
/* userrec optimization stuff */
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 34ce45e14..12c935b3d 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -141,7 +141,7 @@ void Exit(int status)
exit (status);
}
-void Start()
+void InspIRCd::Start()
{
printf("\033[1;32mInspire Internet Relay Chat Server, compiled %s at %s\n",__DATE__,__TIME__);
printf("(C) ChatSpike Development team.\033[0m\n\n");
@@ -167,7 +167,7 @@ void Rehash(int status)
FOREACH_MOD(I_OnRehash,OnRehash(""));
}
-void SetSignals()
+void InspIRCd::SetSignals()
{
signal (SIGALRM, SIG_IGN);
signal (SIGHUP, Rehash);
@@ -176,7 +176,7 @@ void SetSignals()
signal (SIGSEGV, Error);
}
-bool DaemonSeed()
+bool InspIRCd::DaemonSeed()
{
int childpid;
if ((childpid = fork ()) < 0)
@@ -244,7 +244,7 @@ void InspIRCd::MakeLowerMap()
InspIRCd::InspIRCd(int argc, char** argv)
{
- Start();
+ this->Start();
module_sockets.clear();
this->startup_time = time(NULL);
srand(time(NULL));
@@ -317,10 +317,10 @@ InspIRCd::InspIRCd(int argc, char** argv)
memset(&Config->implement_lists,0,sizeof(Config->implement_lists));
printf("\n");
- SetSignals();
+ this->SetSignals();
if (!Config->nofork)
{
- if (!DaemonSeed())
+ if (!this->DaemonSeed())
{
printf("ERROR: could not go into daemon mode. Shutting down.\n");
Exit(ERROR);