summaryrefslogtreecommitdiff
path: root/modules/pseudoclients
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 /modules/pseudoclients
parent3e5a5e1c669f6027b897f7358d45f92e1552f746 (diff)
Unconst these config Get<Anope::string> calls as it makes no sense
Diffstat (limited to 'modules/pseudoclients')
-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
7 files changed, 35 insertions, 35 deletions
diff --git a/modules/pseudoclients/botserv/botserv.cpp b/modules/pseudoclients/botserv/botserv.cpp
index 312b2a9d5..5f07700b2 100644
--- a/modules/pseudoclients/botserv/botserv.cpp
+++ b/modules/pseudoclients/botserv/botserv.cpp
@@ -46,7 +46,7 @@ class BotServCore : public Module, public BotServ::BotServService
void OnReload(Configuration::Conf *conf) override
{
- const Anope::string &bsnick = conf->GetModule(this)->Get<const Anope::string>("client");
+ const Anope::string &bsnick = conf->GetModule(this)->Get<Anope::string>("client");
BotServ = ServiceBot::Find(bsnick, true);
}
@@ -55,7 +55,7 @@ class BotServCore : public Module, public BotServ::BotServService
/* Do not allow removing bot modes on our service bots */
if (chan->ci && chan->ci->GetBot() == user)
{
- const Anope::string &botmodes = Config->GetModule(this)->Get<const Anope::string>("botmodes");
+ const Anope::string &botmodes = Config->GetModule(this)->Get<Anope::string>("botmodes");
for (unsigned i = 0; i < botmodes.length(); ++i)
chan->SetMode(chan->ci->GetBot(), ModeManager::FindChannelModeByChar(botmodes[i]), chan->ci->GetBot()->GetUID());
}
@@ -65,7 +65,7 @@ class BotServCore : public Module, public BotServ::BotServService
{
if (ci->c && ci->c->users.size() >= Config->GetModule(this)->Get<unsigned>("minusers"))
{
- ChannelStatus status(Config->GetModule(this)->Get<const Anope::string>("botmodes"));
+ ChannelStatus status(Config->GetModule(this)->Get<Anope::string>("botmodes"));
bi->Join(ci->c, &status);
}
}
@@ -119,7 +119,7 @@ class BotServCore : public Module, public BotServ::BotServService
/* This is before the user has joined the channel, so check usercount + 1 */
if (c->users.size() + 1 >= Config->GetModule(this)->Get<unsigned>("minusers") && !c->FindUser(c->ci->GetBot()))
{
- ChannelStatus status(Config->GetModule(this)->Get<const Anope::string>("botmodes"));
+ ChannelStatus status(Config->GetModule(this)->Get<Anope::string>("botmodes"));
c->ci->GetBot()->Join(c, &status);
}
}
@@ -158,7 +158,7 @@ class BotServCore : public Module, public BotServ::BotServService
"channel, and provide a more convenient way to execute commands. Commands that\n"
"require a channel as a parameter will automatically have that parameter\n"
"given.\n"), source.service->nick.c_str());
- const Anope::string &fantasycharacters = Config->GetModule("fantasy")->Get<const Anope::string>("fantasycharacter", "!");
+ const Anope::string &fantasycharacters = Config->GetModule("fantasy")->Get<Anope::string>("fantasycharacter", "!");
if (!fantasycharacters.empty())
source.Reply(_(" \n"
"Fantasy commands may be prefixed with one of the following characters: %s\n"), fantasycharacters.c_str());
@@ -189,7 +189,7 @@ class BotServCore : public Module, public BotServ::BotServService
source.Reply(_(" \n"
"Bot will join a channel whenever there is at least\n"
"\002%d\002 user(s) on it."), Config->GetModule(this)->Get<unsigned>("minusers"));
- const Anope::string &fantasycharacters = Config->GetModule("fantasy")->Get<const Anope::string>("fantasycharacter", "!");
+ const Anope::string &fantasycharacters = Config->GetModule("fantasy")->Get<Anope::string>("fantasycharacter", "!");
if (!fantasycharacters.empty())
source.Reply(_("Additionally, if fantasy is enabled fantasy commands\n"
"can be executed by prefixing the command name with\n"
@@ -213,7 +213,7 @@ class BotServCore : public Module, public BotServ::BotServService
void OnCreateChan(ChanServ::Channel *ci) override
{
/* Set default bot flags */
- spacesepstream sep(Config->GetModule(this)->Get<const Anope::string>("defaults", "greet fantasy"));
+ spacesepstream sep(Config->GetModule(this)->Get<Anope::string>("defaults", "greet fantasy"));
for (Anope::string token; sep.GetToken(token);)
ci->SetS<bool>("BS_" + token.upper(), true);
}
@@ -229,7 +229,7 @@ class BotServCore : public Module, public BotServ::BotServService
void OnCreateBot(ServiceBot *bi) override
{
if (bi->botmodes.empty())
- bi->botmodes = Config->GetModule(this)->Get<const Anope::string>("botumodes");
+ bi->botmodes = Config->GetModule(this)->Get<Anope::string>("botumodes");
}
};
diff --git a/modules/pseudoclients/chanserv/chanserv.cpp b/modules/pseudoclients/chanserv/chanserv.cpp
index dbd7f14eb..3824f9fe2 100644
--- a/modules/pseudoclients/chanserv/chanserv.cpp
+++ b/modules/pseudoclients/chanserv/chanserv.cpp
@@ -258,7 +258,7 @@ class ChanServCore : public Module
void OnReload(Configuration::Conf *conf) override
{
- const Anope::string &channick = conf->GetModule(this)->Get<const Anope::string>("client");
+ const Anope::string &channick = conf->GetModule(this)->Get<Anope::string>("client");
if (channick.empty())
throw ConfigException(Module::name + ": <client> must be defined");
@@ -274,8 +274,8 @@ class ChanServCore : public Module
{
Configuration::Block *privilege = conf->GetBlock("privilege", i);
- const Anope::string &nname = privilege->Get<const Anope::string>("name"),
- &desc = privilege->Get<const Anope::string>("desc");
+ const Anope::string &nname = privilege->Get<Anope::string>("name"),
+ &desc = privilege->Get<Anope::string>("desc");
int rank = privilege->Get<int>("rank");
Anope::string value = privilege->Get<Anope::string>("level");
int level;
@@ -289,7 +289,7 @@ class ChanServCore : public Module
AddPrivilege(ChanServ::Privilege(nname, desc, rank, level));
}
- spacesepstream(conf->GetModule(this)->Get<const Anope::string>("defaults", "greet fantasy")).GetTokens(defaults);
+ spacesepstream(conf->GetModule(this)->Get<Anope::string>("defaults", "greet fantasy")).GetTokens(defaults);
if (defaults.empty())
{
defaults.push_back("KEEPTOPIC");
@@ -419,7 +419,7 @@ class ChanServCore : public Module
{
ci->c->RemoveMode(ci->WhoSends(), "REGISTERED", "", false);
- const Anope::string &require = Config->GetModule(this)->Get<const Anope::string>("require");
+ const Anope::string &require = Config->GetModule(this)->Get<Anope::string>("require");
if (!require.empty())
ci->c->SetModes(ci->WhoSends(), false, "-%s", require.c_str());
}
@@ -467,7 +467,7 @@ class ChanServCore : public Module
else
c->RemoveMode(c->ci->WhoSends(), "REGISTERED", "", false);
- const Anope::string &require = Config->GetModule(this)->Get<const Anope::string>("require");
+ const Anope::string &require = Config->GetModule(this)->Get<Anope::string>("require");
if (!require.empty())
{
if (c->ci)
@@ -486,8 +486,8 @@ class ChanServCore : public Module
EventReturn OnCanSet(User *u, const ChannelMode *cm) override
{
- if (Config->GetModule(this)->Get<const Anope::string>("nomlock").find(cm->mchar) != Anope::string::npos
- || Config->GetModule(this)->Get<const Anope::string>("require").find(cm->mchar) != Anope::string::npos)
+ if (Config->GetModule(this)->Get<Anope::string>("nomlock").find(cm->mchar) != Anope::string::npos
+ || Config->GetModule(this)->Get<Anope::string>("require").find(cm->mchar) != Anope::string::npos)
return EVENT_STOP;
return EVENT_CONTINUE;
}
@@ -579,7 +579,7 @@ class ChanServCore : public Module
ci->WhoSends()->Assign(NULL, ci);
if (ci->c->FindUser(ci->GetBot()) == NULL)
{
- ChannelStatus status(Config->GetModule("botserv")->Get<const Anope::string>("botmodes"));
+ ChannelStatus status(Config->GetModule("botserv")->Get<Anope::string>("botmodes"));
ci->GetBot()->Join(ci->c, &status);
}
}
diff --git a/modules/pseudoclients/global.cpp b/modules/pseudoclients/global.cpp
index 108495c42..307785e39 100644
--- a/modules/pseudoclients/global.cpp
+++ b/modules/pseudoclients/global.cpp
@@ -61,7 +61,7 @@ class GlobalCore : public Module
void OnReload(Configuration::Conf *conf) override
{
- const Anope::string &glnick = conf->GetModule(this)->Get<const Anope::string>("client");
+ const Anope::string &glnick = conf->GetModule(this)->Get<Anope::string>("client");
if (glnick.empty())
throw ConfigException(Module::name + ": <client> must be defined");
@@ -75,21 +75,21 @@ class GlobalCore : public Module
void OnRestart() override
{
- const Anope::string &gl = Config->GetModule(this)->Get<const Anope::string>("globaloncycledown");
+ const Anope::string &gl = Config->GetModule(this)->Get<Anope::string>("globaloncycledown");
if (!gl.empty())
this->SendGlobal(Global, "", gl);
}
void OnShutdown() override
{
- const Anope::string &gl = Config->GetModule(this)->Get<const Anope::string>("globaloncycledown");
+ const Anope::string &gl = Config->GetModule(this)->Get<Anope::string>("globaloncycledown");
if (!gl.empty())
this->SendGlobal(Global, "", gl);
}
void OnNewServer(Server *s) override
{
- const Anope::string &gl = Config->GetModule(this)->Get<const Anope::string>("globaloncycleup");
+ const Anope::string &gl = Config->GetModule(this)->Get<Anope::string>("globaloncycleup");
if (!gl.empty() && !Me->IsSynced())
s->Notice(Global, gl);
}
diff --git a/modules/pseudoclients/hostserv.cpp b/modules/pseudoclients/hostserv.cpp
index 03fe451d4..1b42944c3 100644
--- a/modules/pseudoclients/hostserv.cpp
+++ b/modules/pseudoclients/hostserv.cpp
@@ -37,7 +37,7 @@ class HostServCore : public Module
void OnReload(Configuration::Conf *conf) override
{
- const Anope::string &hsnick = conf->GetModule(this)->Get<const Anope::string>("client");
+ const Anope::string &hsnick = conf->GetModule(this)->Get<Anope::string>("client");
if (hsnick.empty())
throw ConfigException(Module::name + ": <client> must be defined");
diff --git a/modules/pseudoclients/memoserv/memoserv.cpp b/modules/pseudoclients/memoserv/memoserv.cpp
index 7952ed637..f83d23399 100644
--- a/modules/pseudoclients/memoserv/memoserv.cpp
+++ b/modules/pseudoclients/memoserv/memoserv.cpp
@@ -41,20 +41,20 @@ class MemoServCore : public Module, public MemoServ::MemoServService
bool SendMemoMail(NickServ::Account *nc, MemoServ::MemoInfo *mi, MemoServ::Memo *m)
{
- Anope::string subject = Language::Translate(nc, Config->GetBlock("mail")->Get<const Anope::string>("memo_subject").c_str()),
- message = Language::Translate(Config->GetBlock("mail")->Get<const Anope::string>("memo_message").c_str());
+ Anope::string subject = Language::Translate(nc, Config->GetBlock("mail")->Get<Anope::string>("memo_subject").c_str()),
+ message = Language::Translate(Config->GetBlock("mail")->Get<Anope::string>("memo_message").c_str());
subject = subject.replace_all_cs("%n", nc->GetDisplay());
subject = subject.replace_all_cs("%s", m->GetSender());
subject = subject.replace_all_cs("%d", stringify(mi->GetIndex(m) + 1));
subject = subject.replace_all_cs("%t", m->GetText());
- 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"));
message = message.replace_all_cs("%n", nc->GetDisplay());
message = message.replace_all_cs("%s", m->GetSender());
message = message.replace_all_cs("%d", stringify(mi->GetIndex(m) + 1));
message = message.replace_all_cs("%t", m->GetText());
- 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"));
return Mail::Send(nc, subject, message);
}
@@ -220,7 +220,7 @@ class MemoServCore : public Module, public MemoServ::MemoServService
void OnReload(Configuration::Conf *conf) override
{
- const Anope::string &msnick = conf->GetModule(this)->Get<const Anope::string>("client");
+ const Anope::string &msnick = conf->GetModule(this)->Get<Anope::string>("client");
if (msnick.empty())
throw ConfigException(Module::name + ": <client> must be defined");
diff --git a/modules/pseudoclients/nickserv/nickserv.cpp b/modules/pseudoclients/nickserv/nickserv.cpp
index 23652c71d..8e2b9bf7c 100644
--- a/modules/pseudoclients/nickserv/nickserv.cpp
+++ b/modules/pseudoclients/nickserv/nickserv.cpp
@@ -75,8 +75,8 @@ class NickServRelease : public User, public Timer
Anope::string nick;
public:
- NickServRelease(Module *me, NickServ::Nick *na, time_t delay) : User(na->GetNick(), Config->GetModule("nickserv")->Get<const Anope::string>("enforceruser", "user"),
- Config->GetModule("nickserv")->Get<const Anope::string>("enforcerhost", "services.localhost.net"), "", "", Me, "Services Enforcer", Anope::CurTime, "", IRCD->UID_Retrieve(), NULL), Timer(me, delay), nick(na->GetNick())
+ NickServRelease(Module *me, NickServ::Nick *na, time_t delay) : User(na->GetNick(), Config->GetModule("nickserv")->Get<Anope::string>("enforceruser", "user"),
+ Config->GetModule("nickserv")->Get<Anope::string>("enforcerhost", "services.localhost.net"), "", "", Me, "Services Enforcer", Anope::CurTime, "", IRCD->UID_Retrieve(), NULL), Timer(me, delay), nick(na->GetNick())
{
/* Erase the current release timer and use the new one */
Anope::map<NickServRelease *>::iterator nit = NickServReleases.find(this->nick);
@@ -282,7 +282,7 @@ class NickServCore : public Module, public NickServ::NickServService
if (IRCD->CanSVSNick)
{
unsigned nicklen = Config->GetBlock("networkinfo")->Get<unsigned>("nicklen");
- const Anope::string &guestprefix = Config->GetModule("nickserv")->Get<const Anope::string>("guestnickprefix", "Guest");
+ const Anope::string &guestprefix = Config->GetModule("nickserv")->Get<Anope::string>("guestnickprefix", "Guest");
Anope::string guestnick;
@@ -369,7 +369,7 @@ class NickServCore : public Module, public NickServ::NickServService
void OnReload(Configuration::Conf *conf) override
{
- const Anope::string &nsnick = conf->GetModule(this)->Get<const Anope::string>("client");
+ const Anope::string &nsnick = conf->GetModule(this)->Get<Anope::string>("client");
if (nsnick.empty())
throw ConfigException(Module::name + ": <client> must be defined");
@@ -380,7 +380,7 @@ class NickServCore : public Module, public NickServ::NickServService
NickServ = bi;
- spacesepstream(conf->GetModule(this)->Get<const Anope::string>("defaults", "ns_secure memo_signon memo_receive")).GetTokens(defaults);
+ spacesepstream(conf->GetModule(this)->Get<Anope::string>("defaults", "ns_secure memo_signon memo_receive")).GetTokens(defaults);
if (defaults.empty())
{
defaults.push_back("NS_SECURE");
@@ -436,7 +436,7 @@ class NickServCore : public Module, public NickServ::NickServService
c->SetCorrectModes(u, true);
}
- const Anope::string &modesonid = block->Get<const Anope::string>("modesonid");
+ const Anope::string &modesonid = block->Get<Anope::string>("modesonid");
if (!modesonid.empty())
u->SetModes(NickServ, "%s", modesonid.c_str());
@@ -475,7 +475,7 @@ class NickServCore : public Module, public NickServ::NickServService
const NickServ::Nick *na = NickServ::FindNick(u->nick);
- const Anope::string &unregistered_notice = Config->GetModule(this)->Get<const Anope::string>("unregistered_notice");
+ const Anope::string &unregistered_notice = Config->GetModule(this)->Get<Anope::string>("unregistered_notice");
if (!Config->GetModule("nickserv")->Get<bool>("nonicknameownership") && !unregistered_notice.empty() && !na && !u->Account())
u->SendMessage(*NickServ, unregistered_notice);
else if (na && !u->IsIdentified(true))
diff --git a/modules/pseudoclients/operserv.cpp b/modules/pseudoclients/operserv.cpp
index 4a81686e4..9f407e059 100644
--- a/modules/pseudoclients/operserv.cpp
+++ b/modules/pseudoclients/operserv.cpp
@@ -252,7 +252,7 @@ class OperServCore : public Module
void OnReload(Configuration::Conf *conf) override
{
- const Anope::string &osnick = conf->GetModule(this)->Get<const Anope::string>("client");
+ const Anope::string &osnick = conf->GetModule(this)->Get<Anope::string>("client");
if (osnick.empty())
throw ConfigException(this->name + ": <client> must be defined");