summaryrefslogtreecommitdiff
path: root/src/config.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-05 21:18:47 -0400
committerAdam <Adam@anope.org>2013-05-05 21:18:47 -0400
commit3f5f84c92c1a424843b430c60a50efa600ae1236 (patch)
treeae16ada522b5cbed074f8d154d01e8657d195318 /src/config.cpp
parent5b3f81ea78f7a8ab69ff94cbf2bbf07f5966682e (diff)
The const char* specialization of this no longer works
Diffstat (limited to 'src/config.cpp')
-rw-r--r--src/config.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/config.cpp b/src/config.cpp
index eac2be8c6..17d15a0d9 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -94,11 +94,6 @@ template<> time_t Block::Get(const Anope::string &tag, const Anope::string &def)
return Anope::DoTime(Get<const Anope::string>(tag, def));
}
-template<> const char* Block::Get(const Anope::string &tag, const Anope::string &def) const
-{
- return this->Get<const Anope::string>(tag, def).c_str();
-}
-
template<> bool Block::Get(const Anope::string &tag, const Anope::string &def) const
{
const Anope::string &str = Get<const Anope::string>(tag, def);
@@ -507,7 +502,7 @@ Conf::Conf() : Block("")
{
try
{
- Anope::casemap = std::locale(options->Get<const char *>("casemap"));
+ Anope::casemap = std::locale(options->Get<const Anope::string>("casemap").c_str());
}
catch (const std::runtime_error &)
{
@@ -524,7 +519,7 @@ Conf::Conf() : Block("")
if (!options->Get<const Anope::string>("user").empty())
{
errno = 0;
- struct passwd *u = getpwnam(options->Get<const char *>("user"));
+ struct passwd *u = getpwnam(options->Get<const Anope::string>("user").c_str());
if (u == NULL)
Log() << "Unable to setuid to " << options->Get<const Anope::string>("user") << ": " << Anope::LastError();
else if (setuid(u->pw_uid) == -1)
@@ -535,7 +530,7 @@ Conf::Conf() : Block("")
if (!options->Get<const Anope::string>("group").empty())
{
errno = 0;
- struct group *g = getgrnam(options->Get<const char *>("group"));
+ struct group *g = getgrnam(options->Get<const Anope::string>("group").c_str());
if (g == NULL)
Log() << "Unable to setgid to " << options->Get<const Anope::string>("group") << ": " << Anope::LastError();
else if (setuid(g->gr_gid) == -1)