diff options
Diffstat (limited to 'modules')
58 files changed, 193 insertions, 193 deletions
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 ®exengine = Config->GetBlock("options")->Get<const Anope::string>("regexengine"); + const Anope::string ®exengine = 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> ¶ms) 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 @@ -374,7 +374,7 @@ class CommandOSAKill : public Command " The default auto kill expiry time is \002{1}\002"), source.command, Anope::Duration(Config->GetModule("operserv")->Get<time_t>("autokillexpiry", "30d"), source.GetAccount())); - const Anope::string ®exengine = Config->GetBlock("options")->Get<const Anope::string>("regexengine"); + const Anope::string ®exengine = Config->GetBlock("options")->Get<Anope::string>("regexengine"); if (!regexengine.empty()) { source.Reply(" "); diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp index 9e38d0779..ba893a960 100644 --- a/modules/commands/os_defcon.cpp +++ b/modules/commands/os_defcon.cpp @@ -362,26 +362,26 @@ class OSDefcon : public Module DefconConfig dconfig; dconfig.defaultlevel = block->Get<int>("defaultlevel"); - dconfig.defcons[4] = block->Get<const Anope::string>("level4"); - dconfig.defcons[3] = block->Get<const Anope::string>("level3"); - dconfig.defcons[2] = block->Get<const Anope::string>("level2"); - dconfig.defcons[1] = block->Get<const Anope::string>("level1"); + dconfig.defcons[4] = block->Get<Anope::string>("level4"); + dconfig.defcons[3] = block->Get<Anope::string>("level3"); + dconfig.defcons[2] = block->Get<Anope::string>("level2"); + dconfig.defcons[1] = block->Get<Anope::string>("level1"); dconfig.sessionlimit = block->Get<int>("sessionlimit"); - dconfig.akillreason = block->Get<const Anope::string>("akillreason"); + dconfig.akillreason = block->Get<Anope::string>("akillreason"); dconfig.akillexpire = block->Get<time_t>("akillexpire"); - dconfig.chanmodes = block->Get<const Anope::string>("chanmodes"); + dconfig.chanmodes = block->Get<Anope::string>("chanmodes"); dconfig.timeout = block->Get<time_t>("timeout"); dconfig.globalondefcon = block->Get<bool>("globalondefcon"); - dconfig.message = block->Get<const Anope::string>("message"); - dconfig.offmessage = block->Get<const Anope::string>("offmessage"); + dconfig.message = block->Get<Anope::string>("message"); + dconfig.offmessage = block->Get<Anope::string>("offmessage"); Module *session = ModuleManager::FindModule("os_session"); block = conf->GetModule(session); dconfig.max_session_kill = block->Get<int>("maxsessionkill"); dconfig.session_autokill_expiry = block->Get<time_t>("sessionautokillexpiry"); - dconfig.sle_reason = block->Get<const Anope::string>("sessionlimitexceeded"); - dconfig.sle_detailsloc = block->Get<const Anope::string>("sessionlimitdetailsloc"); + dconfig.sle_reason = block->Get<Anope::string>("sessionlimitexceeded"); + dconfig.sle_detailsloc = block->Get<Anope::string>("sessionlimitdetailsloc"); if (dconfig.defaultlevel < 1 || dconfig.defaultlevel > 5) throw ConfigException("The value for <defcon:defaultlevel> must be between 1 and 5"); diff --git a/modules/commands/os_forbid.cpp b/modules/commands/os_forbid.cpp index 95ad737b3..be7f908bd 100644 --- a/modules/commands/os_forbid.cpp +++ b/modules/commands/os_forbid.cpp @@ -437,7 +437,7 @@ class CommandOSForbid : public Command { source.Reply(_("Forbid allows you to forbid usage of certain nicknames, channels, and email addresses. Wildcards are accepted for all entries.")); |
