summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 20:27:51 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 20:27:51 +0000
commit23a4885701cba4a87a5ae027257fb4207c917572 (patch)
treecdd4aa7e4260135e444b28182448a14adb4e9a57 /src/inspircd.cpp
parent51924df0a878f66f83ea5639dcb7a761cfa65772 (diff)
Move tons more stuff into class InspIRCd*, make signal handler functions static members
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4855 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 758dd4757..dfebb00d7 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -114,7 +114,7 @@ bool InspIRCd::FindServerName(const std::string &servername)
return (find(servernames.begin(), servernames.end(), servername) != servernames.end());
}
-void Exit(int status)
+void InspIRCd::Exit(int status)
{
if (ServerInstance->Config->log_file)
fclose(ServerInstance->Config->log_file);
@@ -131,19 +131,11 @@ void InspIRCd::Start()
printf("Name concept:\t\t\033[1;32mLord_Zathras\033[0m\n\n");
}
-void Killed(int status)
-{
- if (ServerInstance->Config->log_file)
- fclose(ServerInstance->Config->log_file);
- ServerInstance->SendError("Server terminated.");
- exit(status);
-}
-
-void Rehash(int status)
+void InspIRCd::Rehash(int status)
{
ServerInstance->WriteOpers("Rehashing config file %s due to SIGHUP",ServerConfig::CleanFilename(CONFIG_FILE));
fclose(ServerInstance->Config->log_file);
- OpenLog(NULL,0);
+ ServerInstance->OpenLog(NULL,0);
ServerInstance->Config->Read(false,NULL);
FOREACH_MOD(I_OnRehash,OnRehash(""));
}
@@ -151,11 +143,11 @@ void Rehash(int status)
void InspIRCd::SetSignals(bool SEGVHandler)
{
signal (SIGALRM, SIG_IGN);
- signal (SIGHUP, Rehash);
+ signal (SIGHUP, InspIRCd::Rehash);
signal (SIGPIPE, SIG_IGN);
- signal (SIGTERM, Exit);
+ signal (SIGTERM, InspIRCd::Exit);
if (SEGVHandler)
- signal (SIGSEGV, Error);
+ signal (SIGSEGV, InspIRCd::Error);
}
bool InspIRCd::DaemonSeed()
@@ -939,7 +931,7 @@ int InspIRCd::Run()
log(DEBUG,"RES: %08x",this->Res);
- LoadAllModules(this);
+ this->LoadAllModules();
/* Just in case no modules were loaded - fix for bug #101 */
this->BuildISupport();