summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-12-10 02:09:51 -0500
committerAdam <Adam@anope.org>2014-12-10 02:09:51 -0500
commit50acad5ce451b44b469890fe46ce14c7ffd031ca (patch)
tree231101b9e475dacd58b4d03d1a69df9fe7a82f28 /src
parent3e5a5e1c669f6027b897f7358d45f92e1552f746 (diff)
Unconst these config Get<Anope::string> calls as it makes no sense
Diffstat (limited to 'src')
-rw-r--r--src/config.cpp124
-rw-r--r--src/init.cpp30
-rw-r--r--src/language.cpp2
-rw-r--r--src/mail.cpp14
-rw-r--r--src/messages.cpp4
-rw-r--r--src/protocol.cpp6
-rw-r--r--src/uplink.cpp4
7 files changed, 92 insertions, 92 deletions
diff --git a/src/config.cpp b/src/config.cpp
index 2bdb71f5e..6ac777a98 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -86,12 +86,12 @@ template<> const Anope::string Block::Get(const Anope::string &tag, const Anope:
template<> time_t Block::Get(const Anope::string &tag, const Anope::string &def) const
{
- return Anope::DoTime(Get<const Anope::string>(tag, def));
+ return Anope::DoTime(Get<Anope::string>(tag, def));
}
template<> bool Block::Get(const Anope::string &tag, const Anope::string &def) const
{
- const Anope::string &str = Get<const Anope::string>(tag, def);
+ const Anope::string &str = Get<Anope::string>(tag, def);
return !str.empty() && !str.equals_ci("no") && !str.equals_ci("off") && !str.equals_ci("false") && !str.equals_ci("0");
}
@@ -124,8 +124,8 @@ Conf::Conf() : Block("")
{
Block *include = this->GetBlock("include", i);
- const Anope::string &type = include->Get<const Anope::string>("type"),
- &file = include->Get<const Anope::string>("name");
+ const Anope::string &type = include->Get<Anope::string>("type"),
+ &file = include->Get<Anope::string>("name");
File f(file, type == "executable");
this->LoadConf(f);
@@ -154,17 +154,17 @@ Conf::Conf() : Block("")
};
for (unsigned i = 0; i < sizeof(noreload) / sizeof(noreload[0]); ++i)
- if (this->GetBlock(noreload[i].block)->Get<const Anope::string>(noreload[i].name) != Config->GetBlock(noreload[i].block)->Get<const Anope::string>(noreload[i].name))
+ if (this->GetBlock(noreload[i].block)->Get<Anope::string>(noreload[i].name) != Config->GetBlock(noreload[i].block)->Get<Anope::string>(noreload[i].name))
throw ConfigException("<" + noreload[i].block + ":" + noreload[i].name + "> can not be modified once set");
}
Block *serverinfo = this->GetBlock("serverinfo"), *options = this->GetBlock("options"),
*mail = this->GetBlock("mail"), *networkinfo = this->GetBlock("networkinfo");
- ValidateNotEmpty("serverinfo", "name", serverinfo->Get<const Anope::string>("name"));
- ValidateNotEmpty("serverinfo", "description", serverinfo->Get<const Anope::string>("description"));
- ValidateNotEmpty("serverinfo", "pid", serverinfo->Get<const Anope::string>("pid"));
- ValidateNotEmpty("serverinfo", "motd", serverinfo->Get<const Anope::string>("motd"));
+ ValidateNotEmpty("serverinfo", "name", serverinfo->Get<Anope::string>("name"));
+ ValidateNotEmpty("serverinfo", "description", serverinfo->Get<Anope::string>("description"));
+ ValidateNotEmpty("serverinfo", "pid", serverinfo->Get<Anope::string>("pid"));
+ ValidateNotEmpty("serverinfo", "motd", serverinfo->Get<Anope::string>("motd"));
ValidateNotZero("options", "readtimeout", options->Get<time_t>("readtimeout"));
ValidateNotZero("options", "warningtimeout", options->Get<time_t>("warningtimeout"));
@@ -174,13 +174,13 @@ Conf::Conf() : Block("")
ValidateNotZero("networkinfo", "hostlen", networkinfo->Get<unsigned>("hostlen"));
ValidateNotZero("networkinfo", "chanlen", networkinfo->Get<unsigned>("chanlen"));
- spacesepstream(options->Get<const Anope::string>("ulineservers")).GetTokens(this->Ulines);
+ spacesepstream(options->Get<Anope::string>("ulineservers")).GetTokens(this->Ulines);
if (mail->Get<bool>("usemail"))
{
Anope::string check[] = { "sendmailpath", "sendfrom", "registration_subject", "registration_message", "emailchange_subject", "emailchange_message", "memo_subject", "memo_message" };
for (unsigned i = 0; i < sizeof(check) / sizeof(Anope::string); ++i)
- ValidateNotEmpty("mail", check[i], mail->Get<const Anope::string>(check[i]));
+ ValidateNotEmpty("mail", check[i], mail->Get<Anope::string>(check[i]));
}
this->ReadTimeout = options->Get<time_t>("readtimeout");
@@ -189,20 +189,20 @@ Conf::Conf() : Block("")
this->StrictPrivmsg = !UseStrictPrivmsg ? "/msg " : "/";
{
std::vector<Anope::string> defaults;
- spacesepstream(this->GetModule("nickserv")->Get<const Anope::string>("defaults")).GetTokens(defaults);
+ spacesepstream(this->GetModule("nickserv")->Get<Anope::string>("defaults")).GetTokens(defaults);
this->DefPrivmsg = std::find(defaults.begin(), defaults.end(), "msg") != defaults.end();
}
- this->DefLanguage = options->Get<const Anope::string>("defaultlanguage");
+ this->DefLanguage = options->Get<Anope::string>("defaultlanguage");
this->TimeoutCheck = options->Get<time_t>("timeoutcheck");
for (int i = 0; i < this->CountBlock("uplink"); ++i)
{
Block *uplink = this->GetBlock("uplink", i);
- const Anope::string &host = uplink->Get<const Anope::string>("host");
+ const Anope::string &host = uplink->Get<Anope::string>("host");
bool ipv6 = uplink->Get<bool>("ipv6");
int port = uplink->Get<int>("port");
- const Anope::string &password = uplink->Get<const Anope::string>("password");
+ const Anope::string &password = uplink->Get<Anope::string>("password");
ValidateNotEmpty("uplink", "host", host);
ValidateNotZero("uplink", "port", port);
@@ -215,7 +215,7 @@ Conf::Conf() : Block("")
{
Block *module = this->GetBlock("module", i);
- const Anope::string &modname = module->Get<const Anope::string>("name");
+ const Anope::string &modname = module->Get<Anope::string>("name");
ValidateNotEmpty("module", "name", modname);
@@ -226,11 +226,11 @@ Conf::Conf() : Block("")
{
Block *opertype = this->GetBlock("opertype", i);
- const Anope::string &oname = opertype->Get<const Anope::string>("name"),
- &modes = opertype->Get<const Anope::string>("modes"),
- &inherits = opertype->Get<const Anope::string>("inherits"),
- &commands = opertype->Get<const Anope::string>("commands"),
- &privs = opertype->Get<const Anope::string>("privs");
+ const Anope::string &oname = opertype->Get<Anope::string>("name"),
+ &modes = opertype->Get<Anope::string>("modes"),
+ &inherits = opertype->Get<Anope::string>("inherits"),
+ &commands = opertype->Get<Anope::string>("commands"),
+ &privs = opertype->Get<Anope::string>("privs");
ValidateNotEmpty("opertype", "name", oname);
@@ -271,12 +271,12 @@ Conf::Conf() : Block("")
{
Block *oper = this->GetBlock("oper", i);
- const Anope::string &nname = oper->Get<const Anope::string>("name"),
- &type = oper->Get<const Anope::string>("type"),
- &password = oper->Get<const Anope::string>("password"),
- &certfp = oper->Get<const Anope::string>("certfp"),
- &host = oper->Get<const Anope::string>("host"),
- &vhost = oper->Get<const Anope::string>("vhost");
+ const Anope::string &nname = oper->Get<Anope::string>("name"),
+ &type = oper->Get<Anope::string>("type"),
+ &password = oper->Get<Anope::string>("password"),
+ &certfp = oper->Get<Anope::string>("certfp"),
+ &host = oper->Get<Anope::string>("host"),
+ &vhost = oper->Get<Anope::string>("vhost");
bool require_oper = oper->Get<bool>("require_oper");
ValidateNotEmpty("oper", "name", nname);
@@ -313,12 +313,12 @@ Conf::Conf() : Block("")
{
Block *service = this->GetBlock("service", i);
- const Anope::string &nick = service->Get<const Anope::string>("nick"),
- &user = service->Get<const Anope::string>("user"),
- &host = service->Get<const Anope::string>("host"),
- &gecos = service->Get<const Anope::string>("gecos"),
- &modes = service->Get<const Anope::string>("modes"),
- &channels = service->Get<const Anope::string>("channels");
+ const Anope::string &nick = service->Get<Anope::string>("nick"),
+ &user = service->Get<Anope::string>("user"),
+ &host = service->Get<Anope::string>("host"),
+ &gecos = service->Get<Anope::string>("gecos"),
+ &modes = service->Get<Anope::string>("modes"),
+ &channels = service->Get<Anope::string>("channels");
ValidateNotEmpty("service", "nick", nick);
ValidateNotEmpty("service", "user", user);
@@ -405,16 +405,16 @@ Conf::Conf() : Block("")
LogInfo l(logage, rawio, debug);
- l.bot = ServiceBot::Find(log->Get<const Anope::string>("bot", "Global"), true);
- spacesepstream(log->Get<const Anope::string>("target")).GetTokens(l.targets);
- spacesepstream(log->Get<const Anope::string>("source")).GetTokens(l.sources);
- spacesepstream(log->Get<const Anope::string>("admin")).GetTokens(l.admin);
- spacesepstream(log->Get<const Anope::string>("override")).GetTokens(l.override);
- spacesepstream(log->Get<const Anope::string>("commands")).GetTokens(l.commands);
- spacesepstream(log->Get<const Anope::string>("servers")).GetTokens(l.servers);
- spacesepstream(log->Get<const Anope::string>("channels")).GetTokens(l.channels);
- spacesepstream(log->Get<const Anope::string>("users")).GetTokens(l.users);
- spacesepstream(log->Get<const Anope::string>("other")).GetTokens(l.normal);
+ l.bot = ServiceBot::Find(log->Get<Anope::string>("bot", "Global"), true);
+ spacesepstream(log->Get<Anope::string>("target")).GetTokens(l.targets);
+ spacesepstream(log->Get<Anope::string>("source")).GetTokens(l.sources);
+ spacesepstream(log->Get<Anope::string>("admin")).GetTokens(l.admin);
+ spacesepstream(log->Get<Anope::string>("override")).GetTokens(l.override);
+ spacesepstream(log->Get<Anope::string>("commands")).GetTokens(l.commands);
+ spacesepstream(log->Get<Anope::string>("servers")).GetTokens(l.servers);
+ spacesepstream(log->Get<Anope::string>("channels")).GetTokens(l.channels);
+ spacesepstream(log->Get<Anope::string>("users")).GetTokens(l.users);
+ spacesepstream(log->Get<Anope::string>("other")).GetTokens(l.normal);
this->LogInfos.push_back(l);
}
@@ -432,11 +432,11 @@ Conf::Conf() : Block("")
{
Block *command = this->GetBlock("command", i);
- const Anope::string &service = command->Get<const Anope::string>("service"),
- &nname = command->Get<const Anope::string>("name"),
- &cmd = command->Get<const Anope::string>("command"),
- &permission = command->Get<const Anope::string>("permission"),
- &group = command->Get<const Anope::string>("group");
+ const Anope::string &service = command->Get<Anope::string>("service"),
+ &nname = command->Get<Anope::string>("name"),
+ &cmd = command->Get<Anope::string>("command"),
+ &permission = command->Get<Anope::string>("permission"),
+ &group = command->Get<Anope::string>("group");
bool hide = command->Get<bool>("hide");
ValidateNotEmpty("command", "service", service);
@@ -456,10 +456,10 @@ Conf::Conf() : Block("")
{
Block *fantasy = this->GetBlock("fantasy", i);
- const Anope::string &nname = fantasy->Get<const Anope::string>("name"),
- &service = fantasy->Get<const Anope::string>("command"),
- &permission = fantasy->Get<const Anope::string>("permission"),
- &group = fantasy->Get<const Anope::string>("group");
+ const Anope::string &nname = fantasy->Get<Anope::string>("name"),
+ &service = fantasy->Get<Anope::string>("command"),
+ &permission = fantasy->Get<Anope::string>("permission"),
+ &group = fantasy->Get<Anope::string>("group");
bool hide = fantasy->Get<bool>("hide"),
prepend_channel = fantasy->Get<bool>("prepend_channel", "yes");
@@ -479,8 +479,8 @@ Conf::Conf() : Block("")
{
Block *command_group = this->GetBlock("command_group", i);
- const Anope::string &nname = command_group->Get<const Anope::string>("name"),
- &description = command_group->Get<const Anope::string>("description");
+ const Anope::string &nname = command_group->Get<Anope::string>("name"),
+ &description = command_group->Get<Anope::string>("description");
CommandGroup gr;
gr.name = nname;
@@ -508,19 +508,19 @@ Conf::Conf() : Block("")
Log() << "Tied oper " << na->GetAccount()->GetDisplay() << " to type " << o->GetType()->GetName();
}
- if (options->Get<const Anope::string>("casemap", "ascii") == "ascii")
+ if (options->Get<Anope::string>("casemap", "ascii") == "ascii")
Anope::casemap = std::locale(std::locale(), new Anope::ascii_ctype<char>());
- else if (options->Get<const Anope::string>("casemap") == "rfc1459")
+ else if (options->Get<Anope::string>("casemap") == "rfc1459")
Anope::casemap = std::locale(std::locale(), new Anope::rfc1459_ctype<char>());
else
{
try
{
- Anope::casemap = std::locale(options->Get<const Anope::string>("casemap").c_str());
+ Anope::casemap = std::locale(options->Get<Anope::string>("casemap").c_str());
}
catch (const std::runtime_error &)
{
- Log() << "Unknown casemap " << options->Get<const Anope::string>("casemap") << " - casemap not changed";
+ Log() << "Unknown casemap " << options->Get<Anope::string>("casemap") << " - casemap not changed";
}
}
Anope::CaseMapRebuild();
@@ -611,7 +611,7 @@ Block *Conf::GetModule(const Anope::string &mname)
{
Block *b = &iters.first->second;
- if (b->Get<const Anope::string>("name") == mname)
+ if (b->Get<Anope::string>("name") == mname)
{
block = b;
break;
@@ -628,7 +628,7 @@ ServiceBot *Conf::GetClient(const Anope::string &cname)
return ServiceBot::Find(!it->second.empty() ? it->second : cname, true);
Block *block = GetModule(cname.lower());
- const Anope::string &client = block->Get<const Anope::string>("client");
+ const Anope::string &client = block->Get<Anope::string>("client");
bots[cname] = client;
return GetClient(cname);
}
@@ -890,10 +890,10 @@ void Conf::LoadConf(File &file)
{
Block *define = this->GetBlock("define", i);
- const Anope::string &dname = define->Get<const Anope::string>("name");
+ const Anope::string &dname = define->Get<Anope::string>("name");
if (dname == wordbuffer && define != b)
- wordbuffer = define->Get<const Anope::string>("value");
+ wordbuffer = define->Get<Anope::string>("value");
}
if (b)
diff --git a/src/init.cpp b/src/init.cpp
index 305f7d584..853cf7209 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -206,14 +206,14 @@ static void InitSignals()
static void remove_pidfile()
{
- remove(Config->GetBlock("serverinfo")->Get<const Anope::string>("pid").c_str());
+ remove(Config->GetBlock("serverinfo")->Get<Anope::string>("pid").c_str());
}
/* Create our PID file and write the PID to it. */
static void write_pidfile()
{
- FILE *pidfile = fopen(Config->GetBlock("serverinfo")->Get<const Anope::string>("pid").c_str(), "w");
+ FILE *pidfile = fopen(Config->GetBlock("serverinfo")->Get<Anope::string>("pid").c_str(), "w");
if (pidfile)
{
#ifdef _WIN32
@@ -225,7 +225,7 @@ static void write_pidfile()
atexit(remove_pidfile);
}
else
- throw CoreException("Can not write to PID file " + Config->GetBlock("serverinfo")->Get<const Anope::string>("pid"));
+ throw CoreException("Can not write to PID file " + Config->GetBlock("serverinfo")->Get<Anope::string>("pid"));
}
static void setuidgid()
@@ -235,21 +235,21 @@ static void setuidgid()
uid_t uid = -1;
gid_t gid = -1;
- if (!options->Get<const Anope::string>("user").empty())
+ if (!options->Get<Anope::string>("user").empty())
{
errno = 0;
- struct passwd *u = getpwnam(options->Get<const Anope::string>("user").c_str());
+ struct passwd *u = getpwnam(options->Get<Anope::string>("user").c_str());
if (u == NULL)
- Log() << "Unable to setuid to " << options->Get<const Anope::string>("user") << ": " << Anope::LastError();
+ Log() << "Unable to setuid to " << options->Get<Anope::string>("user") << ": " << Anope::LastError();
else
uid = u->pw_uid;
}
- if (!options->Get<const Anope::string>("group").empty())
+ if (!options->Get<Anope::string>("group").empty())
{
errno = 0;
- struct group *g = getgrnam(options->Get<const Anope::string>("group").c_str());
+ struct group *g = getgrnam(options->Get<Anope::string>("group").c_str());
if (g == NULL)
- Log() << "Unable to setgid to " << options->Get<const Anope::string>("group") << ": " << Anope::LastError();
+ Log() << "Unable to setgid to " << options->Get<Anope::string>("group") << ": " << Anope::LastError();
else
gid = g->gr_gid;
}
@@ -269,16 +269,16 @@ static void setuidgid()
if (static_cast<int>(gid) != -1)
{
if (setgid(gid) == -1)
- Log() << "Unable to setgid to " << options->Get<const Anope::string>("group") << ": " << Anope::LastError();
+ Log() << "Unable to setgid to " << options->Get<Anope::string>("group") << ": " << Anope::LastError();
else
- Log() << "Successfully set group to " << options->Get<const Anope::string>("group");
+ Log() << "Successfully set group to " << options->Get<Anope::string>("group");
}
if (static_cast<int>(uid) != -1)
{
if (setuid(uid) == -1)
- Log() << "Unable to setuid to " << options->Get<const Anope::string>("user") << ": " << Anope::LastError();
+ Log() << "Unable to setuid to " << options->Get<Anope::string>("user") << ": " << Anope::LastError();
else
- Log() << "Successfully set user to " << options->Get<const Anope::string>("user");
+ Log() << "Successfully set user to " << options->Get<Anope::string>("user");
}
#endif
}
@@ -495,7 +495,7 @@ void Anope::Init(int ac, char **av)
/* Create me */
Configuration::Block *block = Config->GetBlock("serverinfo");
- Me = new Server(NULL, block->Get<const Anope::string>("name"), 0, block->Get<const Anope::string>("description"), block->Get<const Anope::string>("id"));
+ Me = new Server(NULL, block->Get<Anope::string>("name"), 0, block->Get<Anope::string>("description"), block->Get<Anope::string>("id"));
for (std::pair<Anope::string, User *> p : UserListByNick)
{
User *u = p.second;
@@ -522,7 +522,7 @@ void Anope::Init(int ac, char **av)
/* load modules */
Log() << "Loading modules...";
for (int i = 0; i < Config->CountBlock("module"); ++i)
- ModuleManager::LoadModule(Config->GetBlock("module", i)->Get<const Anope::string>("name"), NULL);
+ ModuleManager::LoadModule(Config->GetBlock("module", i)->Get<Anope::string>("name"), NULL);
setuidgid();
diff --git a/src/language.cpp b/src/language.cpp
index b1b0d77fc..d73074df4 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -38,7 +38,7 @@ void Language::InitLanguages()
setlocale(LC_ALL, "");
- spacesepstream sep(Config->GetBlock("options")->Get<const Anope::string>("languages"));
+ spacesepstream sep(Config->GetBlock("options")->Get<Anope::string>("languages"));
Anope::string language;
while (sep.GetToken(language))
{
diff --git a/src/mail.cpp b/src/mail.cpp
index 1812156e9..ea5989299 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -17,7 +17,7 @@
#include "protocol.h"
#include "modules/nickserv.h"
-Mail::Message::Message(const Anope::string &sf, const Anope::string &mailto, const Anope::string &a, const Anope::string &s, const Anope::string &m) : Thread(), sendmail_path(Config->GetBlock("mail")->Get<const Anope::string>("sendmailpath")), send_from(sf), mail_to(mailto), addr(a), subject(s), message(m), dont_quote_addresses(Config->GetBlock("mail")->Get<bool>("dontquoteaddresses")), success(false)
+Mail::Message::Message(const Anope::string &sf, const Anope::string &mailto, const Anope::string &a, const Anope::string &s, const Anope::string &m) : Thread(), sendmail_path(Config->GetBlock("mail")->Get<Anope::string>("sendmailpath")), send_from(sf), mail_to(mailto), addr(a), subject(s), message(m), dont_quote_addresses(Config->GetBlock("mail")->Get<bool>("dontquoteaddresses")), success(false)
{
}
@@ -63,19 +63,19 @@ bool Mail::Send(User *u, NickServ::Account *nc, ServiceBot *service, const Anope
if (!u)
{
- if (!b->Get<bool>("usemail") || b->Get<const Anope::string>("sendfrom").empty())
+ if (!b->Get<bool>("usemail") || b->Get<Anope::string>("sendfrom").empty())
return false;
else if (nc->GetEmail().empty())
return false;
nc->lastmail = Anope::CurTime;
- Thread *t = new Mail::Message(b->Get<const Anope::string>("sendfrom"), nc->GetDisplay(), nc->GetEmail(), subject, message);
+ Thread *t = new Mail::Message(b->Get<Anope::string>("sendfrom"), nc->GetDisplay(), nc->GetEmail(), subject, message);
t->Start();
return true;
}
else
{
- if (!b->Get<bool>("usemail") || b->Get<const Anope::string>("sendfrom").empty())
+ if (!b->Get<bool>("usemail") || b->Get<Anope::string>("sendfrom").empty())
u->SendMessage(service, _("Services have been configured to not send mail."));
else if (Anope::CurTime - u->lastmail < b->Get<time_t>("delay"))
u->SendMessage(service, _("Please wait \002%d\002 seconds and retry."), b->Get<time_t>("delay") - (Anope::CurTime - u->lastmail));
@@ -84,7 +84,7 @@ bool Mail::Send(User *u, NickServ::Account *nc, ServiceBot *service, const Anope
else
{
u->lastmail = nc->lastmail = Anope::CurTime;
- Thread *t = new Mail::Message(b->Get<const Anope::string>("sendfrom"), nc->GetDisplay(), nc->GetEmail(), subject, message);
+ Thread *t = new Mail::Message(b->Get<Anope::string>("sendfrom"), nc->GetDisplay(), nc->GetEmail(), subject, message);
t->Start();
return true;
}
@@ -96,11 +96,11 @@ bool Mail::Send(User *u, NickServ::Account *nc, ServiceBot *service, const Anope
bool Mail::Send(NickServ::Account *nc, const Anope::string &subject, const Anope::string &message)
{
Configuration::Block *b = Config->GetBlock("mail");
- if (!b->Get<bool>("usemail") || b->Get<const Anope::string>("sendfrom").empty() || !nc || nc->GetEmail().empty() || subject.empty() || message.empty())
+ if (!b->Get<bool>("usemail") || b->Get<Anope::string>("sendfrom").empty() || !nc || nc->GetEmail().empty() || subject.empty() || message.empty())
return false;
nc->lastmail = Anope::CurTime;
- Thread *t = new Mail::Message(b->Get<const Anope::string>("sendfrom"), nc->GetDisplay(), nc->GetEmail(), subject, message);
+ Thread *t = new Mail::Message(b->Get<Anope::string>("sendfrom"), nc->GetDisplay(), nc->GetEmail(), subject, message);
t->Start();
return true;
diff --git a/src/messages.cpp b/src/messages.cpp
index 9cdab67c1..a19c71332 100644
--- a/src/messages.cpp
+++ b/src/messages.cpp
@@ -237,7 +237,7 @@ void MOTD::Run(MessageSource &source, const std::vector<Anope::string> &params)
if (s != Me)
return;
- FILE *f = fopen(Config->GetBlock("serverinfo")->Get<const Anope::string>("motd").c_str(), "r");
+ FILE *f = fopen(Config->GetBlock("serverinfo")->Get<Anope::string>("motd").c_str(), "r");
if (f)
{
IRCD->SendNumeric(375, source.GetSource(), ":- %s Message of the Day", s->GetName().c_str());
@@ -475,7 +475,7 @@ void Whois::Run(MessageSource &source, const std::vector<Anope::string> &params)
IRCD->SendNumeric(311, source.GetSource(), "%s %s %s * :%s", u->nick.c_str(), u->GetIdent().c_str(), u->host.c_str(), u->realname.c_str());
if (bi)
IRCD->SendNumeric(307, source.GetSource(), "%s :is a registered nick", bi->nick.c_str());
- IRCD->SendNumeric(312, source.GetSource(), "%s %s :%s", u->nick.c_str(), Me->GetName().c_str(), Config->GetBlock("serverinfo")->Get<const Anope::string>("description").c_str());
+ IRCD->SendNumeric(312, source.GetSource(), "%s %s :%s", u->nick.c_str(), Me->GetName().c_str(), Config->GetBlock("serverinfo")->Get<Anope::string>("description").c_str());
if (bi)
IRCD->SendNumeric(317, source.GetSource(), "%s %ld %ld :seconds idle, signon time", bi->nick.c_str(), static_cast<long>(Anope::CurTime - bi->lastmsg), static_cast<long>(bi->signon));
IRCD->SendNumeric(318, source.GetSource(), "%s :End of /WHOIS list.", u->nick.c_str());
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 4baa35c80..d0cb5df68 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -78,7 +78,7 @@ Anope::string IRCDProto::SID_Retrieve()
if (!IRCD || !IRCD->RequiresID)
return "";
- static Anope::string current_sid = Config->GetBlock("serverinfo")->Get<const Anope::string>("id");
+ static Anope::string current_sid = Config->GetBlock("serverinfo")->Get<Anope::string>("id");
if (current_sid.empty())
current_sid = "00A";
@@ -403,8 +403,8 @@ bool IRCDProto::IsHostValid(const Anope::string &host)
if (host.empty() || host.length() > Config->GetBlock("networkinfo")->Get<unsigned>("hostlen"))
return false;
- const Anope::string &vhostdisablebe = Config->GetBlock("networkinfo")->Get<const Anope::string>("disallow_start_or_end"),
- vhostchars = Config->GetBlock("networkinfo")->Get<const Anope::string>("vhost_chars");
+ const Anope::string &vhostdisablebe = Config->GetBlock("networkinfo")->Get<Anope::string>("disallow_start_or_end"),
+ vhostchars = Config->GetBlock("networkinfo")->Get<Anope::string>("vhost_chars");
if (vhostdisablebe.find_first_of(host[0]) != Anope::string::npos)
return false;
diff --git a/src/uplink.cpp b/src/uplink.cpp
index 2235da81e..f886b3f81 100644
--- a/src/uplink.cpp
+++ b/src/uplink.cpp
@@ -54,8 +54,8 @@ void Uplink::Connect()
Configuration::Uplink &u = Config->Uplinks[Anope::CurrentUplink];
new UplinkSocket();
- if (!Config->GetBlock("serverinfo")->Get<const Anope::string>("localhost").empty())
- UplinkSock->Bind(Config->GetBlock("serverinfo")->Get<const Anope::string>("localhost"));
+ if (!Config->GetBlock("serverinfo")->Get<Anope::string>("localhost").empty())
+ UplinkSock->Bind(Config->GetBlock("serverinfo")->Get<Anope::string>("localhost"));
Event::OnPreServerConnect(&Event::PreServerConnect::OnPreServerConnect);
Anope::string ip = Anope::Resolve(u.host, u.ipv6 ? AF_INET6 : AF_INET);
Log(LOG_TERMINAL) << "Attempting to connect to uplink #" << (Anope::CurrentUplink + 1) << " " << u.host << " (" << ip << "), port " << u.port;