summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-05-06 21:43:50 -0400
committerAdam <Adam@anope.org>2012-05-06 21:43:50 -0400
commit675b113c3e03cf1917b2a731c21fe82b5f1f2b2b (patch)
tree6a80aaeafa829a3cef5c41c938d92ffedd1bdad8 /src/main.cpp
parenteb0e07d5645c06eb034cfcfbf91883158ba9dc00 (diff)
Split up db/conf/lib/locale install directories, and allow alternate ones to be specified at runtime
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp
index cacfec814..e3fcb8bb2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -43,14 +43,13 @@
/* Command-line options: (note that configuration variables are in config.c) */
Anope::string services_dir; /* -dir dirname */
Anope::string services_bin; /* Binary as specified by the user */
-Anope::string orig_cwd; /* Original current working directory */
+Anope::string binary_dir; /* Used to store base path for Anope */
int debug = 0; /* -debug */
bool readonly = false; /* -readonly */
bool nofork = false; /* -nofork */
bool nothird = false; /* -nothrid */
bool noexpire = false; /* -noexpire */
bool protocoldebug = false; /* -protocoldebug */
-Anope::string binary_dir; /* Used to store base path for Anope */
/* Set to 1 if we are to quit */
bool quitting = false;
@@ -366,10 +365,6 @@ Anope::string GetFullProgDir(const Anope::string &argv0)
int main(int ac, char **av, char **envp)
{
- char cwd[PATH_MAX] = "";
- getcwd(cwd, PATH_MAX);
- orig_cwd = cwd;
-
#ifndef _WIN32
/* If we're root, issue a warning now */
if (!getuid() && !getgid())
@@ -387,11 +382,10 @@ int main(int ac, char **av, char **envp)
#ifdef _WIN32
Anope::string::size_type n = binary_dir.rfind('\\');
- services_dir = binary_dir.substr(0, n) + "\\data";
#else
Anope::string::size_type n = binary_dir.rfind('/');
- services_dir = binary_dir.substr(0, n) + "/data";
#endif
+ services_dir = binary_dir.substr(0, n);
/* Clean out the module runtime directory prior to running, just in case files were left behind during a previous run */
ModuleManager::CleanupRuntimeDirectory();