From 75eb9178d5051046aa86d1115ad02c5be17b79be Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 1 Jul 2006 15:01:32 +0000 Subject: Make WritePID a public function of class InspIRCd git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4097 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/inspircd.h | 2 +- src/configreader.cpp | 2 +- src/inspircd.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/inspircd.h b/include/inspircd.h index 9a0561f93..af1d5cd90 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -101,6 +101,7 @@ class InspIRCd std::string GetRevision(); std::string GetVersionString(); + void WritePID(const std::string &filename); char* ModuleError(); bool LoadModule(const char* filename); bool UnloadModule(const char* filename); @@ -116,7 +117,6 @@ class InspIRCd /* Miscellaneous stuff here, moved from inspircd_io.h */ void Exit(int status); -void WritePID(const std::string &filename); /* userrec optimization stuff */ void AddServerName(const std::string &servername); diff --git a/src/configreader.cpp b/src/configreader.cpp index 9f8ae0ef0..2cc1cd9c1 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -769,7 +769,7 @@ void ServerConfig::Read(bool bail, userrec* user) delete[] data[n]; // write once here, to try it out and make sure its ok - WritePID(Config->PID); + ServerInstance->WritePID(Config->PID); log(DEFAULT,"Done reading configuration file, InspIRCd is now starting."); diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 12c935b3d..8176b8332 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -207,7 +207,7 @@ bool InspIRCd::DaemonSeed() return true; } -void WritePID(const std::string &filename) +void InspIRCd::WritePID(const std::string &filename) { std::ofstream outfile(filename.c_str()); if (outfile.is_open()) @@ -931,7 +931,7 @@ int InspIRCd::Run() for (int count = 0; count < stats->BoundPortCount; count++) SE->AddFd(openSockfd[count],true,X_LISTEN); - WritePID(Config->PID); + this->WritePID(Config->PID); /* main loop, this never returns */ expire_run = false; -- cgit v1.2.3