summaryrefslogtreecommitdiff
path: root/modules/pseudoclients
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-05 21:05:43 -0400
committerAdam <Adam@anope.org>2013-05-05 21:05:43 -0400
commit5b3f81ea78f7a8ab69ff94cbf2bbf07f5966682e (patch)
tree3536557fea79ffd77bb5a885465e579eeeafb8ff /modules/pseudoclients
parent3e8752fe665c3cdf683f2b5fa271231fb3a624df (diff)
That doesn't work either, just don't use references.
find ./ -name '*.cpp' -exec sed -i 's/Get<const Anope::string\&>/Get<const Anope::string>/g' {} \;
Diffstat (limited to 'modules/pseudoclients')
-rw-r--r--modules/pseudoclients/botserv.cpp16
-rw-r--r--modules/pseudoclients/chanserv.cpp12
-rw-r--r--modules/pseudoclients/global.cpp8
-rw-r--r--modules/pseudoclients/hostserv.cpp2
-rw-r--r--modules/pseudoclients/memoserv.cpp6
-rw-r--r--modules/pseudoclients/nickserv.cpp8
-rw-r--r--modules/pseudoclients/operserv.cpp2
7 files changed, 27 insertions, 27 deletions
diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp
index c33a8eeb5..bae03eb7e 100644
--- a/modules/pseudoclients/botserv.cpp
+++ b/modules/pseudoclients/botserv.cpp
@@ -30,7 +30,7 @@ class BotServCore : public Module
void OnReload(Configuration::Conf *conf) anope_override
{
- const Anope::string &bsnick = conf->GetModule(this)->Get<const Anope::string &>("client");
+ const Anope::string &bsnick = conf->GetModule(this)->Get<const Anope::string>("client");
if (bsnick.empty())
throw ConfigException(this->name + ": <client> must be defined");
@@ -47,7 +47,7 @@ class BotServCore : public Module
/* Do not allow removing bot modes on our service bots */
if (chan->ci && chan->ci->bi == user)
{
- const Anope::string &botmodes = Config->GetModule(this)->Get<const Anope::string &>("botmodes");
+ const Anope::string &botmodes = Config->GetModule(this)->Get<const Anope::string>("botmodes");
for (unsigned i = 0; i < botmodes.length(); ++i)
chan->SetMode(chan->ci->bi, ModeManager::FindChannelModeByChar(botmodes[i]), chan->ci->bi->GetUID());
}
@@ -57,7 +57,7 @@ class BotServCore : public Module
{
if (Me->IsSynced() && 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<const Anope::string>("botmodes"));
bi->Join(ci->c, &status);
}
}
@@ -99,7 +99,7 @@ class BotServCore : public Module
if (!realbuf.find(c->ci->bi->nick))
params.erase(params.begin());
- else if (!realbuf.find_first_of(Config->GetModule(this)->Get<const Anope::string &>("fantasycharacter", "!")))
+ else if (!realbuf.find_first_of(Config->GetModule(this)->Get<const Anope::string>("fantasycharacter", "!")))
params[0].erase(params[0].begin());
else
return;
@@ -231,7 +231,7 @@ class BotServCore : public Module
**/
if (c->users.size() >= Config->GetModule(this)->Get<unsigned>("minusers") && !c->FindUser(c->ci->bi))
{
- ChannelStatus status(Config->GetModule(this)->Get<const Anope::string &>("botmodes"));
+ ChannelStatus status(Config->GetModule(this)->Get<const Anope::string>("botmodes"));
c->ci->bi->Join(c, &status);
}
/* Only display the greet if the main uplink we're connected
@@ -279,7 +279,7 @@ class BotServCore : public Module
"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(this)->Get<const Anope::string &>("fantasycharacter", "!");
+ const Anope::string &fantasycharacters = Config->GetModule(this)->Get<const 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());
@@ -310,7 +310,7 @@ class BotServCore : public Module
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(this)->Get<const Anope::string &>("fantasycharacter", "!");
+ const Anope::string &fantasycharacters = Config->GetModule(this)->Get<const 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"
@@ -334,7 +334,7 @@ class BotServCore : public Module
void OnCreateChan(ChannelInfo *ci) anope_override
{
/* Set default bot flags */
- spacesepstream sep(Config->GetModule(this)->Get<const Anope::string &>("defaults", "greet fantasy"));
+ spacesepstream sep(Config->GetModule(this)->Get<const Anope::string>("defaults", "greet fantasy"));
for (Anope::string token; sep.GetToken(token);)
this->ExtendMetadata("BS_" + token);
}
diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp
index e34cd56e8..a93271581 100644
--- a/modules/pseudoclients/chanserv.cpp
+++ b/modules/pseudoclients/chanserv.cpp
@@ -149,7 +149,7 @@ class ChanServCore : public Module
void OnReload(Configuration::Conf *conf) anope_override
{
- const Anope::string &channick = conf->GetModule(this)->Get<const Anope::string &>("client");
+ const Anope::string &channick = conf->GetModule(this)->Get<const Anope::string>("client");
if (channick.empty())
throw ConfigException(this->name + ": <client> must be defined");
@@ -160,7 +160,7 @@ class ChanServCore : public Module
ChanServ = bi;
- spacesepstream(conf->GetModule(this)->Get<const Anope::string &>("defaults", "greet fantasy")).GetTokens(defaults);
+ spacesepstream(conf->GetModule(this)->Get<const Anope::string>("defaults", "greet fantasy")).GetTokens(defaults);
if (defaults.empty())
{
defaults.push_back("KEEPTOPIC");
@@ -297,7 +297,7 @@ class ChanServCore : public Module
EventReturn OnCheckModes(Channel *c) anope_override
{
- const Anope::string &require = Config->GetModule(this)->Get<const Anope::string &>("require", "r");
+ const Anope::string &require = Config->GetModule(this)->Get<const Anope::string>("require", "r");
if (!require.empty())
{
if (c->ci)
@@ -319,7 +319,7 @@ class ChanServCore : public Module
{
Anope::string modes;
- spacesepstream sep(Config->GetModule(this)->Get<const Anope::string &>("mlock", "+nrt"));
+ spacesepstream sep(Config->GetModule(this)->Get<const Anope::string>("mlock", "+nrt"));
if (sep.GetToken(modes))
{
bool add = true;
@@ -343,8 +343,8 @@ class ChanServCore : public Module
EventReturn OnCanSet(User *u, const ChannelMode *cm) anope_override
{
- if (Config->GetModule(this)->Get<const Anope::string &>("nomlock").find(cm->mchar) != Anope::string::npos
- || Config->GetModule(this)->Get<const Anope::string &>("require", "r").find(cm->mchar) || Anope::string::npos)
+ if (Config->GetModule(this)->Get<const Anope::string>("nomlock").find(cm->mchar) != Anope::string::npos
+ || Config->GetModule(this)->Get<const Anope::string>("require", "r").find(cm->mchar) || Anope::string::npos)
return EVENT_STOP;
return EVENT_CONTINUE;
}
diff --git a/modules/pseudoclients/global.cpp b/modules/pseudoclients/global.cpp
index 501b02194..67cb594c5 100644
--- a/modules/pseudoclients/global.cpp
+++ b/modules/pseudoclients/global.cpp
@@ -61,7 +61,7 @@ class GlobalCore : public Module
void OnReload(Configuration::Conf *conf) anope_override
{
- const Anope::string &glnick = conf->GetModule(this)->Get<const Anope::string &>("client");
+ const Anope::string &glnick = conf->GetModule(this)->Get<const Anope::string>("client");
if (glnick.empty())
throw ConfigException(this->name + ": <client> must be defined");
@@ -81,21 +81,21 @@ class GlobalCore : public Module
void OnRestart() anope_override
{
- const Anope::string &gl = Config->GetModule(this)->Get<const Anope::string &>("globaloncycledown");
+ const Anope::string &gl = Config->GetModule(this)->Get<const Anope::string>("globaloncycledown");
if (!gl.empty())
this->global.SendGlobal(Global, "", gl);
}
void OnShutdown() anope_override
{
- const Anope::string &gl = Config->GetModule(this)->Get<const Anope::string &>("globaloncycledown");
+ const Anope::string &gl = Config->GetModule(this)->Get<const Anope::string>("globaloncycledown");
if (!gl.empty())
this->global.SendGlobal(Global, "", gl);
}
void OnNewServer(Server *s) anope_override
{
- const Anope::string &gl = Config->GetModule(this)->Get<const Anope::string &>("globaloncycleup");
+ const Anope::string &gl = Config->GetModule(this)->Get<const 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 acca6f7ff..cd3c84d55 100644
--- a/modules/pseudoclients/hostserv.cpp
+++ b/modules/pseudoclients/hostserv.cpp
@@ -33,7 +33,7 @@ class HostServCore : public Module
void OnReload(Configuration::Conf *conf) anope_override
{
- const Anope::string &hsnick = conf->GetModule(this)->Get<const Anope::string &>("client");
+ const Anope::string &hsnick = conf->GetModule(this)->Get<const Anope::string>("client");
if (hsnick.empty())
throw ConfigException(this->name + ": <client> must be defined");
diff --git a/modules/pseudoclients/memoserv.cpp b/modules/pseudoclients/memoserv.cpp
index 499722686..13a34137c 100644
--- a/modules/pseudoclients/memoserv.cpp
+++ b/modules/pseudoclients/memoserv.cpp
@@ -22,13 +22,13 @@ static bool SendMemoMail(NickCore *nc, MemoInfo *mi, Memo *m)
subject = subject.replace_all_cs("%s", m->sender);
subject = subject.replace_all_cs("%d", stringify(mi->GetIndex(m) + 1));
subject = subject.replace_all_cs("%t", m->text);
- subject = subject.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<const Anope::string &>("networkname"));
+ subject = subject.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<const Anope::string>("networkname"));
message = message.replace_all_cs("%n", nc->display);
message = message.replace_all_cs("%s", m->sender);
message = message.replace_all_cs("%d", stringify(mi->GetIndex(m) + 1));
message = message.replace_all_cs("%t", m->text);
- message = message.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<const Anope::string &>("networkname"));
+ message = message.replace_all_cs("%N", Config->GetBlock("networkinfo")->Get<const Anope::string>("networkname"));
return Mail::Send(nc, subject, message);
}
@@ -154,7 +154,7 @@ class MemoServCore : public Module
void OnReload(Configuration::Conf *conf) anope_override
{
- const Anope::string &msnick = conf->GetModule(this)->Get<const Anope::string &>("client");
+ const Anope::string &msnick = conf->GetModule(this)->Get<const Anope::string>("client");
if (msnick.empty())
throw ConfigException(this->name + ": <client> must be defined");
diff --git a/modules/pseudoclients/nickserv.cpp b/modules/pseudoclients/nickserv.cpp
index 1177f9327..e45ad6abf 100644
--- a/modules/pseudoclients/nickserv.cpp
+++ b/modules/pseudoclients/nickserv.cpp
@@ -209,7 +209,7 @@ class NickServCore : public Module
void OnReload(Configuration::Conf *conf) anope_override
{
- const Anope::string &nsnick = conf->GetModule(this)->Get<const Anope::string &>("client");
+ const Anope::string &nsnick = conf->GetModule(this)->Get<const Anope::string>("client");
if (nsnick.empty())
throw ConfigException(this->name + ": <client> must be defined");
@@ -220,7 +220,7 @@ class NickServCore : public Module
NickServ = bi;
- spacesepstream(conf->GetModule(this)->Get<const Anope::string &>("defaults", "secure memo_signon memo_receive")).GetTokens(defaults);
+ spacesepstream(conf->GetModule(this)->Get<const Anope::string>("defaults", "secure memo_signon memo_receive")).GetTokens(defaults);
if (defaults.empty())
{
defaults.push_back("SECURE");
@@ -287,7 +287,7 @@ class NickServCore : public Module
c->SetCorrectModes(u, true, true);
}
- const Anope::string &modesonid = block->Get<const Anope::string &>("modesonid");
+ const Anope::string &modesonid = block->Get<const Anope::string>("modesonid");
if (!modesonid.empty())
u->SetModes(NickServ, "%s", modesonid.c_str());
@@ -335,7 +335,7 @@ class NickServCore : public Module
return;
const NickAlias *na = NickAlias::Find(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<const Anope::string>("unregistered_notice");
if (!Config->GetBlock("options")->Get<bool>("nonicknameownership") && !unregistered_notice.empty() && !na)
u->SendMessage(NickServ, unregistered_notice);
else if (na)
diff --git a/modules/pseudoclients/operserv.cpp b/modules/pseudoclients/operserv.cpp
index a3a384cea..0720110cb 100644
--- a/modules/pseudoclients/operserv.cpp
+++ b/modules/pseudoclients/operserv.cpp
@@ -185,7 +185,7 @@ class OperServCore : public Module
void OnReload(Configuration::Conf *conf) anope_override
{
- const Anope::string &osnick = conf->GetModule(this)->Get<const Anope::string &>("client");
+ const Anope::string &osnick = conf->GetModule(this)->Get<const Anope::string>("client");
if (osnick.empty())
throw ConfigException(this->name + ": <client> must be defined");