summaryrefslogtreecommitdiff
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
parent3e5a5e1c669f6027b897f7358d45f92e1552f746 (diff)
Unconst these config Get<Anope::string> calls as it makes no sense
-rw-r--r--include/config.h2
-rw-r--r--modules/bs_autoassign.cpp2
-rw-r--r--modules/commands/cs_akick.cpp2
-rw-r--r--modules/commands/cs_flags.cpp4
-rw-r--r--modules/commands/cs_list.cpp4
-rw-r--r--modules/commands/cs_log.cpp6
-rw-r--r--modules/commands/cs_mode.cpp10
-rw-r--r--modules/commands/cs_set_misc.cpp6
-rw-r--r--modules/commands/cs_xop.cpp8
-rw-r--r--modules/commands/ns_group.cpp2
-rw-r--r--modules/commands/ns_list.cpp2
-rw-r--r--modules/commands/ns_register.cpp22
-rw-r--r--modules/commands/ns_resetpass.cpp8
-rw-r--r--modules/commands/ns_set.cpp8
-rw-r--r--modules/commands/ns_set_misc.cpp6
-rw-r--r--modules/commands/os_akill.cpp2
-rw-r--r--modules/commands/os_defcon.cpp20
-rw-r--r--modules/commands/os_forbid.cpp2
-rw-r--r--modules/commands/os_ignore.cpp2
-rw-r--r--modules/commands/os_list.cpp4
-rw-r--r--modules/commands/os_logsearch.cpp2
-rw-r--r--modules/commands/os_news.cpp8
-rw-r--r--modules/commands/os_session.cpp4
-rw-r--r--modules/commands/os_sxline.cpp4
-rw-r--r--modules/database/db_flatfile.cpp2
-rw-r--r--modules/database/db_old.cpp2
-rw-r--r--modules/database/db_sql.cpp4
-rw-r--r--modules/extra/m_ldap.cpp10
-rw-r--r--modules/extra/m_ldap_authentication.cpp16
-rw-r--r--modules/extra/m_ldap_oper.cpp10
-rw-r--r--modules/extra/m_mysql.cpp12
-rw-r--r--modules/extra/m_sql_authentication.cpp6
-rw-r--r--modules/extra/m_sql_log.cpp2
-rw-r--r--modules/extra/m_sql_oper.cpp4
-rw-r--r--modules/extra/m_sqlite.cpp6
-rw-r--r--modules/extra/m_ssl_gnutls.cpp6
-rw-r--r--modules/extra/m_ssl_openssl.cpp4
-rw-r--r--modules/extra/stats/cs_fantasy_stats.cpp4
-rw-r--r--modules/extra/stats/cs_fantasy_top.cpp4
-rw-r--r--modules/extra/stats/irc2sql/irc2sql.cpp8
-rw-r--r--modules/extra/stats/m_chanstats.cpp10
-rw-r--r--modules/fantasy.cpp4
-rw-r--r--modules/m_dns.cpp8
-rw-r--r--modules/m_dnsbl.cpp8
-rw-r--r--modules/m_helpchan.cpp2
-rw-r--r--modules/m_httpd.cpp8
-rw-r--r--modules/m_proxyscan.cpp16
-rw-r--r--modules/m_redis.cpp4
-rw-r--r--modules/m_rewrite.cpp8
-rw-r--r--modules/m_xmlrpc.cpp2
-rw-r--r--modules/protocol/inspircd20.cpp2
-rw-r--r--modules/pseudoclients/botserv/botserv.cpp16
-rw-r--r--modules/pseudoclients/chanserv/chanserv.cpp18
-rw-r--r--modules/pseudoclients/global.cpp8
-rw-r--r--modules/pseudoclients/hostserv.cpp2
-rw-r--r--modules/pseudoclients/memoserv/memoserv.cpp10
-rw-r--r--modules/pseudoclients/nickserv/nickserv.cpp14
-rw-r--r--modules/pseudoclients/operserv.cpp2
-rw-r--r--modules/webcpanel/webcpanel.cpp6
-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
66 files changed, 286 insertions, 286 deletions
diff --git a/include/config.h b/include/config.h
index 455785096..fe4a6fded 100644
--- a/include/config.h
+++ b/include/config.h
@@ -46,7 +46,7 @@ namespace Configuration
*/
template<typename T> T Get(const Anope::string &tag, const Anope::string &def) const
{
- const Anope::string &value = this->Get<const Anope::string>(tag, def);
+ const Anope::string &value = this->Get<Anope::string>(tag, def);
if (!value.empty())
try
{
diff --git a/modules/bs_autoassign.cpp b/modules/bs_autoassign.cpp
index 2e26319b6..911ba2c76 100644
--- a/modules/bs_autoassign.cpp
+++ b/modules/bs_autoassign.cpp
@@ -20,7 +20,7 @@ class BSAutoAssign : public Module
void OnChanRegistered(ChanServ::Channel *ci) override
{
- const Anope::string &bot = Config->GetModule(this)->Get<const Anope::string>("bot");
+ const Anope::string &bot = Config->GetModule(this)->Get<Anope::string>("bot");
if (bot.empty())
return;
diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp
index f88904a46..e18ead579 100644
--- a/modules/commands/cs_akick.cpp
+++ b/modules/commands/cs_akick.cpp
@@ -703,7 +703,7 @@ class CSAKick : public Module
mask = ak->GetMask();
reason = ak->GetReason();
if (reason.empty())
- reason = Language::Translate(u, Config->GetModule(this)->Get<const Anope::string>("autokickreason").c_str());
+ reason = Language::Translate(u, Config->GetModule(this)->Get<Anope::string>("autokickreason").c_str());
if (reason.empty())
reason = Language::Translate(u, _("User has been banned from the channel"));
return EVENT_STOP;
diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp
index 478a2f3d2..03edc28e9 100644
--- a/modules/commands/cs_flags.cpp
+++ b/modules/commands/cs_flags.cpp
@@ -489,13 +489,13 @@ class CSFlags : public Module
{
Configuration::Block *priv = conf->GetBlock("privilege", i);
- const Anope::string &pname = priv->Get<const Anope::string>("name");
+ const Anope::string &pname = priv->Get<Anope::string>("name");
ChanServ::Privilege *p = ChanServ::service ? ChanServ::service->FindPrivilege(pname) : nullptr;
if (p == NULL)
continue;
- const Anope::string &value = priv->Get<const Anope::string>("flag");
+ const Anope::string &value = priv->Get<Anope::string>("flag");
if (value.empty())
continue;
diff --git a/modules/commands/cs_list.cpp b/modules/commands/cs_list.cpp
index 44c96d0ce..e3efaa547 100644
--- a/modules/commands/cs_list.cpp
+++ b/modules/commands/cs_list.cpp
@@ -158,10 +158,10 @@ class CommandCSList : public Command
" {0} #51-100\n"
" Lists all registered channels within the given range (51-100)."));
- if (!Config->GetBlock("options")->Get<const Anope::string>("regexengine").empty())
+ if (!Config->GetBlock("options")->Get<Anope::string>("regexengine").empty())
{
source.Reply(" ");
- source.Reply(_("Regex matches are also supported using the {0} engine. Enclose your pattern in // if this is desired."), Config->GetBlock("options")->Get<const Anope::string>("regexengine"));
+ source.Reply(_("Regex matches are also supported using the {0} engine. Enclose your pattern in // if this is desired."), Config->GetBlock("options")->Get<Anope::string>("regexengine"));
}
return true;
diff --git a/modules/commands/cs_log.cpp b/modules/commands/cs_log.cpp
index 6c7ca03d1..f8624ce76 100644
--- a/modules/commands/cs_log.cpp
+++ b/modules/commands/cs_log.cpp
@@ -364,9 +364,9 @@ class CSLog : public Module
LogDefault ld;
- ld.service = def->Get<const Anope::string>("service");
- ld.command = def->Get<const Anope::string>("command");
- ld.method = def->Get<const Anope::string>("method");
+ ld.service = def->Get<Anope::string>("service");
+ ld.command = def->Get<Anope::string>("command");
+ ld.method = def->Get<Anope::string>("method");
defaults.push_back(ld);
}
diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp
index d26e113d6..b525f51a5 100644
--- a/modules/commands/cs_mode.cpp
+++ b/modules/commands/cs_mode.cpp
@@ -881,14 +881,14 @@ class CSMode : public Module
{
Configuration::Block *block = conf->GetBlock("command", i);
- const Anope::string &cname = block->Get<const Anope::string>("name"),
- &cmd = block->Get<const Anope::string>("command");
+ const Anope::string &cname = block->Get<Anope::string>("name"),
+ &cmd = block->Get<Anope::string>("command");
if (cname.empty() || cmd != "chanserv/modes")
continue;
- const Anope::string &set = block->Get<const Anope::string>("set"),
- &unset = block->Get<const Anope::string>("unset");
+ const Anope::string &set = block->Get<Anope::string>("set"),
+ &unset = block->Get<Anope::string>("unset");
if (set.empty() && unset.empty())
continue;
@@ -946,7 +946,7 @@ class CSMode : public Module
void OnChanRegistered(ChanServ::Channel *ci) override
{
Anope::string mlock;
- spacesepstream sep(Config->GetModule(this)->Get<const Anope::string>("mlock", "+nt"));
+ spacesepstream sep(Config->GetModule(this)->Get<Anope::string>("mlock", "+nt"));
if (sep.GetToken(mlock))
{
bool add = true;
diff --git a/modules/commands/cs_set_misc.cpp b/modules/commands/cs_set_misc.cpp
index 48716b194..51cf44b79 100644
--- a/modules/commands/cs_set_misc.cpp
+++ b/modules/commands/cs_set_misc.cpp
@@ -189,11 +189,11 @@ class CSSetMisc : public Module
{
Configuration::Block *block = conf->GetBlock("command", i);
- if (block->Get<const Anope::string>("command") != "chanserv/set/misc")
+ if (block->Get<Anope::string>("command") != "chanserv/set/misc")
continue;
- Anope::string cname = block->Get<const Anope::string>("name");
- Anope::string desc = block->Get<const Anope::string>("misc_description");
+ Anope::string cname = block->Get<Anope::string>("name");
+ Anope::string desc = block->Get<Anope::string>("misc_description");
if (cname.empty() || desc.empty())
continue;
diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp
index 38d03daf7..cc39ad8b9 100644
--- a/modules/commands/cs_xop.cpp
+++ b/modules/commands/cs_xop.cpp
@@ -618,13 +618,13 @@ class CSXOP : public Module
for (int i = 0; i < conf->CountBlock("privilege"); ++i)
{
Configuration::Block *block = conf->GetBlock("privilege", i);
- const Anope::string &pname = block->Get<const Anope::string>("name");
+ const Anope::string &pname = block->Get<Anope::string>("name");
ChanServ::Privilege *p = ChanServ::service ? ChanServ::service->FindPrivilege(pname) : nullptr;
if (p == NULL)
continue;
- const Anope::string &xop = block->Get<const Anope::string>("xop");
+ const Anope::string &xop = block->Get<Anope::string>("xop");
if (pname.empty() || xop.empty())
continue;
@@ -634,8 +634,8 @@ class CSXOP : public Module
for (int i = 0; i < conf->CountBlock("command"); ++i)
{
Configuration::Block *block = conf->GetBlock("command", i);
- const Anope::string &cname = block->Get<const Anope::string>("name"),
- &cserv = block->Get<const Anope::string>("command");
+ const Anope::string &cname = block->Get<Anope::string>("name"),
+ &cserv = block->Get<Anope::string>("command");
if (cname.empty() || cserv != "chanserv/xop")
continue;
diff --git a/modules/commands/ns_group.cpp b/modules/commands/ns_group.cpp
index e3acf74f9..9a9b933f4 100644
--- a/modules/commands/ns_group.cpp
+++ b/modules/commands/ns_group.cpp
@@ -125,7 +125,7 @@ class CommandNSGroup : public Command
}
NickServ::Nick *target, *na = NickServ::FindNick(u->nick);
- const Anope::string &guestnick = Config->GetModule("nickserv")->Get<const Anope::string>("guestnickprefix", "Guest");
+ const Anope::string &guestnick = Config->GetModule("nickserv")->Get<Anope::string>("guestnickprefix", "Guest");
time_t reg_delay = Config->GetModule("nickserv")->Get<time_t>("regdelay");
unsigned maxaliases = Config->GetModule(this->owner)->Get<unsigned>("maxaliases");
if (!(target = NickServ::FindNick(nick)))
diff --git a/modules/commands/ns_list.cpp b/modules/commands/ns_list.cpp
index e5dd56562..3307f6fed 100644
--- a/modules/commands/ns_list.cpp
+++ b/modules/commands/ns_list.cpp
@@ -163,7 +163,7 @@ class CommandNSList : public Command
" {0} #51-100\n"
" Lists all registered nicks within the given range (51-100)."));
- const Anope::string &regexengine = Config->GetBlock("options")->Get<const Anope::string>("regexengine");
+ const Anope::string &regexengine = Config->GetBlock("options")->Get<Anope::string>("regexengine");
if (!regexengine.empty())
{
source.Reply(" ");
diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp
index 1c601e2a2..b13a945a6 100644
--- a/modules/commands/ns_register.cpp
+++ b/modules/commands/ns_register.cpp
@@ -111,7 +111,7 @@ class CommandNSRegister : public Command
size_t nicklen = u_nick.length();
Anope::string pass = params[0];
Anope::string email = params.size() > 1 ? params[1] : "";
- const Anope::string &nsregister = Config->GetModule(this->owner)->Get<const Anope::string>("registration");
+ const Anope::string &nsregister = Config->GetModule(this->owner)->Get<Anope::string>("registration");
if (Anope::ReadOnly)
{
@@ -138,7 +138,7 @@ class CommandNSRegister : public Command
/* Guest nick can now have a series of between 1 and 7 digits.
* --lara
*/
- const Anope::string &guestnick = Config->GetModule("nickserv")->Get<const Anope::string>("guestnickprefix", "Guest");
+ const Anope::string &guestnick = Config->GetModule("nickserv")->Get<Anope::string>("guestnickprefix", "Guest");
if (nicklen <= guestnick.length() + 7 && nicklen >= guestnick.length() + 1 && !u_nick.find_ci(guestnick) && u_nick.substr(guestnick.length()).find_first_not_of("1234567890") == Anope::string::npos)
{
source.Reply(_("\002{0}\002 may not be registered."), u_nick);
@@ -284,7 +284,7 @@ class CommandNSResend : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) override
{
- if (!Config->GetModule(this->owner)->Get<const Anope::string>("registration").equals_ci("mail"))
+ if (!Config->GetModule(this->owner)->Get<Anope::string>("registration").equals_ci("mail"))
{
source.Reply(_("Access denied."));
return;
@@ -323,7 +323,7 @@ class CommandNSResend : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
{
- if (!Config->GetModule(this->owner)->Get<const Anope::string>("registration").equals_ci("mail"))
+ if (!Config->GetModule(this->owner)->Get<Anope::string>("registration").equals_ci("mail"))
return false;
source.Reply(_("This command will resend you the registration confirmation email."));
@@ -332,7 +332,7 @@ class CommandNSResend : public Command
void OnServHelp(CommandSource &source) override
{
- if (Config->GetModule(this->owner)->Get<const Anope::string>("registration").equals_ci("mail"))
+ if (Config->GetModule(this->owner)->Get<Anope::string>("registration").equals_ci("mail"))
Command::OnServHelp(source);
}
};
@@ -358,7 +358,7 @@ class NSRegister : public Module
, unconfirmed(this, NickServ::account, "UNCONFIRMED")
, passcode(this, NickServ::account, "passcode")
{
- if (Config->GetModule(this)->Get<const Anope::string>("registration").equals_ci("disable"))
+ if (Config->GetModule(this)->Get<Anope::string>("registration").equals_ci("disable"))
throw ModuleException("Module " + this->name + " will not load with registration disabled.");
}
@@ -367,7 +367,7 @@ class NSRegister : public Module
ServiceBot *NickServ;
if (unconfirmed.HasExt(u->Account()) && (NickServ = Config->GetClient("NickServ")))
{
- const Anope::string &nsregister = Config->GetModule(this)->Get<const Anope::string>("registration");
+ const Anope::string &nsregister = Config->GetModule(this)->Get<Anope::string>("registration");
if (nsregister.equals_ci("admin"))
u->SendMessage(NickServ, _("All new accounts must be validated by an administrator. Please wait for your registration to be confirmed."));
else
@@ -399,15 +399,15 @@ static bool SendRegmail(User *u, NickServ::Nick *na, ServiceBot *bi)
if (code == NULL)
code = na->GetAccount()->Extend<Anope::string>("passcode", Anope::Random(9));
- Anope::string subject = Language::Translate(na->GetAccount(), Config->GetBlock("mail")->Get<const Anope::string>("registration_subject").c_str()),
- message = Language::Translate(na->GetAccount(), Config->GetBlock("mail")->Get<const Anope::string>("registration_message").c_str());
+ Anope::string subject = Language::Translate(na->GetAccount(), Config->GetBlock("mail")->Get<Anope::string>("registration_subject").c_str()),
+ message = Language::Translate(na->GetAccount(), Config->GetBlock("mail")->Get<Anope::string>("registration_message").c_str());
subject = subject.replace_all_cs("%n", na->GetNick());
- subject = subject.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<const Anope::string>("networkname"));
+ subject = subject.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<Anope::string>("networkname"));
subject = subject.replace_all_cs("%c", *code);
message = message.replace_all_cs("%n", na->GetNick());
- message = message.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<const Anope::string>("networkname"));
+ message = message.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<Anope::string>("networkname"));
message = message.replace_all_cs("%c", *code);
return Mail::Send(u, nc, bi, subject, message);
diff --git a/modules/commands/ns_resetpass.cpp b/modules/commands/ns_resetpass.cpp
index 2ee7f7a01..2680c9b42 100644
--- a/modules/commands/ns_resetpass.cpp
+++ b/modules/commands/ns_resetpass.cpp
@@ -122,16 +122,16 @@ class NSResetPass : public Module
static bool SendResetEmail(User *u, NickServ::Nick *na, ServiceBot *bi)
{
- Anope::string subject = Language::Translate(na->GetAccount(), Config->GetBlock("mail")->Get<const Anope::string>("reset_subject").c_str()),
- message = Language::Translate(na->GetAccount(), Config->GetBlock("mail")->Get<const Anope::string>("reset_message").c_str()),
+ Anope::string subject = Language::Translate(na->GetAccount(), Config->GetBlock("mail")->Get<Anope::string>("reset_subject").c_str()),
+ message = Language::Translate(na->GetAccount(), Config->GetBlock("mail")->Get<Anope::string>("reset_message").c_str()),
passcode = Anope::Random(20);
subject = subject.replace_all_cs("%n", na->GetNick());
- subject = subject.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<const Anope::string>("networkname"));
+ subject = subject.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<Anope::string>("networkname"));
subject = subject.replace_all_cs("%c", passcode);
message = message.replace_all_cs("%n", na->GetNick());
- message = message.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<const Anope::string>("networkname"));
+ message = message.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<Anope::string>("networkname"));
message = message.replace_all_cs("%c", passcode);
na->GetAccount()->Extend<ResetInfo>("reset", ResetInfo{passcode, Anope::CurTime});
diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp
index f60c23053..b04687b7b 100644
--- a/modules/commands/ns_set.cpp
+++ b/modules/commands/ns_set.cpp
@@ -400,15 +400,15 @@ class CommandNSSetEmail : public Command
u->Account()->Extend<std::pair<Anope::string, Anope::string> >("ns_set_email", std::make_pair(new_email, code));
- Anope::string subject = Config->GetBlock("mail")->Get<const Anope::string>("emailchange_subject"),
- message = Config->GetBlock("mail")->Get<const Anope::string>("emailchange_message");
+ Anope::string subject = Config->GetBlock("mail")->Get<Anope::string>("emailchange_subject"),
+ message = Config->GetBlock("mail")->Get<Anope::string>("emailchange_message");
subject = subject.replace_all_cs("%e", u->Account()->GetEmail());
- subject = subject.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<const Anope::string>("networkname"));
+ subject = subject.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<Anope::string>("networkname"));
subject = subject.replace_all_cs("%c", code);
message = message.replace_all_cs("%e", u->Account()->GetEmail());
- message = message.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<const Anope::string>("networkname"));
+ message = message.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<Anope::string>("networkname"));
message = message.replace_all_cs("%c", code);
Anope::string old = u->Account()->GetEmail();
diff --git a/modules/commands/ns_set_misc.cpp b/modules/commands/ns_set_misc.cpp
index a062f0511..eb94c0f13 100644
--- a/modules/commands/ns_set_misc.cpp
+++ b/modules/commands/ns_set_misc.cpp
@@ -201,13 +201,13 @@ class NSSetMisc : public Module
{
Configuration::Block *block = conf->GetBlock("command", i);
- const Anope::string &cmd = block->Get<const Anope::string>("command");
+ const Anope::string &cmd = block->Get<Anope::string>("command");
if (cmd != "nickserv/set/misc" && cmd != "nickserv/saset/misc")
continue;
- Anope::string cname = block->Get<const Anope::string>("name");
- Anope::string desc = block->Get<const Anope::string>("misc_description");
+ Anope::string cname = block->Get<Anope::string>("name");
+ Anope::string desc = block->Get<Anope::string>("misc_description");
if (cname.empty() || desc.empty())
continue;
diff --git a/modules/commands/os_akill.cpp b/modules/commands/os_akill.cpp
index d9d18a776..6330f2417 100644
--- a/modules/commands/os_akill.cpp
+++ b/modules/commands/os_akill.cpp