diff options
| author | 2013-07-10 18:11:48 +0100 | |
|---|---|---|
| committer | 2013-08-12 16:53:33 +0100 | |
| commit | 29822a263b3b408559257e9ef2bd29167e7573fa (patch) | |
| tree | 85a67980fb21b7a61756761558fef396adad7dd7 /src/modules.cpp | |
| parent | Require privs given on initial join to be in <options:defaultmodes>. (diff) | |
Add <path> keys for all of the compile-time paths.
Also, make all paths in the config relative to their associated
directory. This reverts a change in 2.0 which turned out to be a
terrible idea, especially for system-wide installations.
Diffstat (limited to 'src/modules.cpp')
| -rw-r--r-- | src/modules.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index 5fc8ffc47..47c994088 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -577,7 +577,8 @@ FileReader::FileReader(const std::string& filename) void FileReader::Load(const std::string& filename) { // If the file is stored in the file cache then we used that version instead. - ConfigFileCache::iterator it = ServerInstance->Config->Files.find(filename); + std::string realName = ServerInstance->Config->Paths.PrependConfig(filename); + ConfigFileCache::iterator it = ServerInstance->Config->Files.find(realName); if (it != ServerInstance->Config->Files.end()) { this->lines = it->second; @@ -586,7 +587,7 @@ void FileReader::Load(const std::string& filename) { lines.clear(); - std::ifstream stream(filename.c_str()); + std::ifstream stream(realName.c_str()); if (!stream.is_open()) throw CoreException(filename + " does not exist or is not readable!"); |
