summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-10-09 22:04:32 -0400
committerAdam <Adam@anope.org>2016-10-09 22:04:32 -0400
commitd22b68b7f747578477163c307f6af3914f05f43e (patch)
tree0335f243372c4917b82d40b2634a7799e2a9413a
parentcfbbcf32164c6011c80d2a3eed78f1db48c9903b (diff)
Adjust reading chanserv core config opts
-rw-r--r--modules/chanserv/access.cpp6
-rw-r--r--modules/chanserv/akick.cpp2
-rw-r--r--modules/chanserv/ban.cpp4
-rw-r--r--modules/chanserv/clone.cpp2
-rw-r--r--modules/chanserv/flags.cpp6
-rw-r--r--modules/chanserv/kick.cpp4
-rw-r--r--modules/chanserv/main/chanserv.cpp2
-rw-r--r--modules/chanserv/register.cpp2
-rw-r--r--modules/chanserv/set.cpp4
-rw-r--r--modules/chanserv/xop.cpp6
-rw-r--r--modules/operserv/forbid.cpp4
11 files changed, 21 insertions, 21 deletions
diff --git a/modules/chanserv/access.cpp b/modules/chanserv/access.cpp
index 5c9650577..ba9f2b5fb 100644
--- a/modules/chanserv/access.cpp
+++ b/modules/chanserv/access.cpp
@@ -157,7 +157,7 @@ class CommandCSAccess : public Command
NickServ::Nick *na = NickServ::FindNick(mask);
- if (!na && Config->GetModule("chanserv")->Get<bool>("disallow_hostmask_access"))
+ if (!na && Config->GetModule("chanserv/main")->Get<bool>("disallow_hostmask_access"))
{
source.Reply(_("Masks and unregistered users may not be on access lists."));
return;
@@ -194,7 +194,7 @@ class CommandCSAccess : public Command
}
}
- unsigned access_max = Config->GetModule("chanserv")->Get<unsigned>("accessmax", "1024");
+ unsigned access_max = Config->GetModule("chanserv/main")->Get<unsigned>("accessmax", "1024");
if (access_max && ci->GetAccessCount() >= access_max)
{
source.Reply(_("Sorry, you can only have %d access entries on a channel, including access entries from other channels."), access_max);
@@ -554,7 +554,7 @@ class CommandCSAccess : public Command
" Use of this command requires the \002{4}\002 privilege on \037channel\037."),
source.command, ChanServ::ACCESS_INVALID + 1, ChanServ::ACCESS_FOUNDER - 1, "AUTOOP", "ACCESS_CHANGE");
- if (!Config->GetModule("chanserv")->Get<bool>("disallow_channel_access"))
+ if (!Config->GetModule("chanserv/main")->Get<bool>("disallow_channel_access"))
source.Reply(_("The given \037mask\037 may also be a channel, which will use the access list from the other channel up to the given \037level\037."));
//XXX show def levels
diff --git a/modules/chanserv/akick.cpp b/modules/chanserv/akick.cpp
index 71ea85e73..ff7fb5b69 100644
--- a/modules/chanserv/akick.cpp
+++ b/modules/chanserv/akick.cpp
@@ -159,7 +159,7 @@ class CommandCSAKick : public Command
Anope::string reason = params.size() > 3 ? params[3] : "";
NickServ::Nick *na = NickServ::FindNick(mask);
NickServ::Account *nc = NULL;
- unsigned reasonmax = Config->GetModule("chanserv")->Get<unsigned>("reasonmax", "200");
+ unsigned reasonmax = Config->GetModule("chanserv/main")->Get<unsigned>("reasonmax", "200");
if (reason.length() > reasonmax)
reason = reason.substr(0, reasonmax);
diff --git a/modules/chanserv/ban.cpp b/modules/chanserv/ban.cpp
index c8d9023e3..552ef03bf 100644
--- a/modules/chanserv/ban.cpp
+++ b/modules/chanserv/ban.cpp
@@ -105,11 +105,11 @@ class CommandCSBan : public Command
reason += " " + params[3];
}
- unsigned reasonmax = Config->GetModule("chanserv")->Get<unsigned>("reasonmax", "200");
+ unsigned reasonmax = Config->GetModule("chanserv/main")->Get<unsigned>("reasonmax", "200");
if (reason.length() > reasonmax)
reason = reason.substr(0, reasonmax);
- Anope::string signkickformat = Config->GetModule("chanserv")->Get<Anope::string>("signkickformat", "%m (%n)");
+ Anope::string signkickformat = Config->GetModule("chanserv/main")->Get<Anope::string>("signkickformat", "%m (%n)");
signkickformat = signkickformat.replace_all_cs("%n", source.GetNick());
User *u = source.GetUser();
diff --git a/modules/chanserv/clone.cpp b/modules/chanserv/clone.cpp
index 8483b0af3..96aa89bf4 100644
--- a/modules/chanserv/clone.cpp
+++ b/modules/chanserv/clone.cpp
@@ -138,7 +138,7 @@ public:
else if (what.equals_ci("ACCESS"))
{
std::set<Anope::string> masks;
- unsigned access_max = Config->GetModule("chanserv")->Get<unsigned>("accessmax", "1024");
+ unsigned access_max = Config->GetModule("chanserv/main")->Get<unsigned>("accessmax", "1024");
unsigned count = 0;
for (unsigned i = 0; i < target_ci->GetAccessCount(); ++i)
diff --git a/modules/chanserv/flags.cpp b/modules/chanserv/flags.cpp
index 5f3212481..732e3aa8a 100644
--- a/modules/chanserv/flags.cpp
+++ b/modules/chanserv/flags.cpp
@@ -113,7 +113,7 @@ class CommandCSFlags : public Command
if (IRCD->IsChannelValid(mask))
{
- if (Config->GetModule("chanserv")->Get<bool>("disallow_channel_access"))
+ if (Config->GetModule("chanserv/main")->Get<bool>("disallow_channel_access"))
{
source.Reply(_("Channels may not be on access lists."));
return;
@@ -136,7 +136,7 @@ class CommandCSFlags : public Command
else
{
na = NickServ::FindNick(mask);
- if (!na && Config->GetModule("chanserv")->Get<bool>("disallow_hostmask_access"))
+ if (!na && Config->GetModule("chanserv/main")->Get<bool>("disallow_hostmask_access"))
{
source.Reply(_("Masks and unregistered users may not be on access lists."));
return;
@@ -189,7 +189,7 @@ class CommandCSFlags : public Command
}
}
- unsigned access_max = Config->GetModule("chanserv")->Get<unsigned>("accessmax", "1024");
+ unsigned access_max = Config->GetModule("chanserv/main")->Get<unsigned>("accessmax", "1024");
if (access_max && ci->GetAccessCount() >= access_max)
{
source.Reply(_("Sorry, you can only have \002{0}\002 access entries on a channel, including access entries from other channels."), access_max);
diff --git a/modules/chanserv/kick.cpp b/modules/chanserv/kick.cpp
index b78357d3e..0fd8979d4 100644
--- a/modules/chanserv/kick.cpp
+++ b/modules/chanserv/kick.cpp
@@ -52,13 +52,13 @@ class CommandCSKick : public Command
return;
}
- unsigned reasonmax = Config->GetModule("chanserv")->Get<unsigned>("reasonmax", "200");
+ unsigned reasonmax = Config->GetModule("chanserv/main")->Get<unsigned>("reasonmax", "200");
if (reason.length() > reasonmax)
reason = reason.substr(0, reasonmax);
ChanServ::AccessGroup u_access = source.AccessFor(ci);
- Anope::string signkickformat = Config->GetModule("chanserv")->Get<Anope::string>("signkickformat", "%m (%n)");
+ Anope::string signkickformat = Config->GetModule("chanserv/main")->Get<Anope::string>("signkickformat", "%m (%n)");
signkickformat = signkickformat.replace_all_cs("%n", source.GetNick());
if (!u_access.HasPriv("KICK") && !source.HasPriv("chanserv/kick"))
diff --git a/modules/chanserv/main/chanserv.cpp b/modules/chanserv/main/chanserv.cpp
index f53f6301b..47174eb26 100644
--- a/modules/chanserv/main/chanserv.cpp
+++ b/modules/chanserv/main/chanserv.cpp
@@ -525,7 +525,7 @@ class ChanServCore : public Module
if (ci->c->FindUser(ci->GetBot()) == NULL)
{
Anope::string botmodes = Config->GetModule("botserv")->Get<Anope::string>("botmodes",
- Config->GetModule("chanserv")->Get<Anope::string>("botmodes"));
+ Config->GetModule("chanserv/main")->Get<Anope::string>("botmodes"));
ChannelStatus status(botmodes);
ci->GetBot()->Join(ci->c, &status);
}
diff --git a/modules/chanserv/register.cpp b/modules/chanserv/register.cpp
index 47356b507..3affb8b43 100644
--- a/modules/chanserv/register.cpp
+++ b/modules/chanserv/register.cpp
@@ -86,7 +86,7 @@ class CommandCSRegister : public Command
return;
}
- unsigned maxregistered = Config->GetModule("chanserv")->Get<unsigned>("maxregistered");
+ unsigned maxregistered = Config->GetModule("chanserv/main")->Get<unsigned>("maxregistered");
if (maxregistered && nc->GetChannelCount() >= maxregistered && !source.HasPriv("chanserv/no-register-limit"))
{
if (nc->GetChannelCount() > maxregistered)
diff --git a/modules/chanserv/set.cpp b/modules/chanserv/set.cpp
index 0d3e6e77e..6c2d48e79 100644
--- a/modules/chanserv/set.cpp
+++ b/modules/chanserv/set.cpp
@@ -308,7 +308,7 @@ class CommandCSSetFounder : public Command
}
NickServ::Account *nc = na->GetAccount();
- unsigned max_reg = Config->GetModule("chanserv")->Get<unsigned>("maxregistered");
+ unsigned max_reg = Config->GetModule("chanserv/main")->Get<unsigned>("maxregistered");
if (max_reg && nc->GetChannelCount() >= max_reg && !source.HasPriv("chanserv/no-register-limit"))
{
source.Reply(_("\002{0}\002 has too many channels registered."), na->GetNick());
@@ -468,7 +468,7 @@ class CommandCSSetPeace : public Command
inline static Anope::string BotModes()
{
return Config->GetModule("botserv")->Get<Anope::string>("botmodes",
- Config->GetModule("chanserv")->Get<Anope::string>("botmodes", "o")
+ Config->GetModule("chanserv/main")->Get<Anope::string>("botmodes", "o")
);
}
diff --git a/modules/chanserv/xop.cpp b/modules/chanserv/xop.cpp
index 74feaca7e..5ccf389dc 100644
--- a/modules/chanserv/xop.cpp
+++ b/modules/chanserv/xop.cpp
@@ -161,7 +161,7 @@ class CommandCSXOP : public Command
if (IRCD->IsChannelValid(mask))
{
- if (Config->GetModule("chanserv")->Get<bool>("disallow_channel_access"))
+ if (Config->GetModule("chanserv/main")->Get<bool>("disallow_channel_access"))
{
source.Reply(_("Channels may not be on access lists."));
return;
@@ -186,7 +186,7 @@ class CommandCSXOP : public Command
{
na = NickServ::FindNick(mask);
- if (!na && Config->GetModule("chanserv")->Get<bool>("disallow_hostmask_access"))
+ if (!na && Config->GetModule("chanserv/main")->Get<bool>("disallow_hostmask_access"))
{
source.Reply(_("Masks and unregistered users may not be on access lists."));
return;
@@ -225,7 +225,7 @@ class CommandCSXOP : public Command
}
}
- unsigned access_max = Config->GetModule("chanserv")->Get<unsigned>("accessmax", "1024");
+ unsigned access_max = Config->GetModule("chanserv/main")->Get<unsigned>("accessmax", "1024");
if (access_max && ci->GetAccessCount() >= access_max)
{
source.Reply(_("Sorry, you can only have %d access entries on a channel, including access entries from other channels."), access_max);
diff --git a/modules/operserv/forbid.cpp b/modules/operserv/forbid.cpp
index 84f5d3a93..e706083e0 100644
--- a/modules/operserv/forbid.cpp
+++ b/modules/operserv/forbid.cpp
@@ -317,7 +317,7 @@ class CommandOSForbid : public Command
ServiceBot *OperServ = Config->GetClient("OperServ");
if (IRCD->CanSQLineChannel && OperServ)
{
- time_t inhabit = Config->GetModule("chanserv")->Get<time_t>("inhabit", "15s");
+ time_t inhabit = Config->GetModule("chanserv/main")->Get<time_t>("inhabit", "15s");
#warning "xline allocated on stack"
#if 0
XLine x(c->name, OperServ->nick, Anope::CurTime + inhabit, d->GetReason());
@@ -512,7 +512,7 @@ class OSForbid : public Module
{
if (IRCD->CanSQLineChannel)
{
- time_t inhabit = Config->GetModule("chanserv")->Get<time_t>("inhabit", "15s");
+ time_t inhabit = Config->GetModule("chanserv/main")->Get<time_t>("inhabit", "15s");
#warning "xline allocated on stack"
#if 0
XLine x(c->name, OperServ->nick, Anope::CurTime + inhabit, d->GetReason());