summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorAdam <adam@sigterm.info>2013-12-14 22:55:10 -0800
committerAdam <adam@sigterm.info>2013-12-14 22:55:10 -0800
commit59df199aaedf8018979c444eaa8cca59ff001877 (patch)
treee7d873a3250f50b2ecb7c4bc47d7fcf7a9cefefd /src/configreader.cpp
parent357d190074ee58809b31ea0c08543566168bddf6 (diff)
parentad47ea662698e72ff8f79b03512b1e7fe81bdf53 (diff)
Merge pull request #689 from SaberUK/master+cxxify
Clean up various things.
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 7493d980c..341414e0d 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -734,11 +734,6 @@ void ServerConfig::ApplyModules(User* user)
}
}
-bool ServerConfig::StartsWithWindowsDriveLetter(const std::string &path)
-{
- return (path.length() > 2 && isalpha(path[0]) && path[1] == ':');
-}
-
ConfigTag* ServerConfig::ConfValue(const std::string &tag)
{
ConfigTagList found = config_data.equal_range(tag);
@@ -757,18 +752,6 @@ ConfigTagList ServerConfig::ConfTags(const std::string& tag)
return config_data.equal_range(tag);
}
-bool ServerConfig::FileExists(const char* file)
-{
- struct stat sb;
- if (stat(file, &sb) == -1)
- return false;
-
- if ((sb.st_mode & S_IFDIR) > 0)
- return false;
-
- return !access(file, F_OK);
-}
-
std::string ServerConfig::Escape(const std::string& str, bool xml)
{
std::string escaped;
@@ -793,22 +776,6 @@ std::string ServerConfig::Escape(const std::string& str, bool xml)
return escaped;
}
-std::string ServerConfig::ExpandPath(const std::string& base, const std::string& fragment)
-{
- // The fragment is an absolute path, don't modify it.
- if (fragment[0] == '/' || ServerConfig::StartsWithWindowsDriveLetter(fragment))
- return fragment;
-
- return base + '/' + fragment;
-}
-
-const char* ServerConfig::CleanFilename(const char* name)
-{
- const char* p = name + strlen(name);
- while ((p != name) && (*p != '/') && (*p != '\\')) p--;
- return (p != name ? ++p : p);
-}
-
void ConfigReaderThread::Run()
{
Config->Read();