summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-13 01:44:22 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-13 01:44:22 +0000
commitd1ddbd62f91d4b9453447b5d25f5e41e807b0010 (patch)
tree89ee0a02bab93e38f35195d236e13f3e22906932 /src/inspircd.cpp
parent547e7e9b382255b1699ff897f40fb4ed659c3360 (diff)
Change to new execution directory structure
Don't change CWD into bin/ Remove path-resolution hacks from configuration Store pidfile and xline DBs in data, logs in logs. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11866 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index a932b95e1..4956cfa8c 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -286,18 +286,9 @@ bool InspIRCd::DaemonSeed()
void InspIRCd::WritePID(const std::string &filename)
{
- std::string fname = (filename.empty() ? "inspircd.pid" : filename);
- std::replace(fname.begin(), fname.end(), '\\', '/');
- if ((fname[0] != '/') && (!Config->StartsWithWindowsDriveLetter(filename)))
- {
- std::string::size_type pos;
- std::string confpath = this->ConfigFileName;
- if ((pos = confpath.rfind("/")) != std::string::npos)
- {
- /* Leaves us with just the path */
- fname = confpath.substr(0, pos) + std::string("/") + fname;
- }
- }
+ std::string fname(filename);
+ if (fname.empty())
+ fname = "data/inspircd.pid";
std::ofstream outfile(fname.c_str());
if (outfile.is_open())
{
@@ -470,7 +461,6 @@ InspIRCd::InspIRCd(int argc, char** argv) :
WSAStartup(MAKEWORD(2,0), &wsadata);
ChangeWindowsSpecificPointers();
#endif
- Config->MyExecutable = argv[0];
/* Set the finished argument values */
Config->nofork = do_nofork;