summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/ns_group.cpp4
-rw-r--r--modules/commands/ns_recover.cpp2
-rw-r--r--modules/commands/ns_register.cpp6
-rw-r--r--modules/commands/ns_set.cpp8
4 files changed, 10 insertions, 10 deletions
diff --git a/modules/commands/ns_group.cpp b/modules/commands/ns_group.cpp
index 81daddf84..c40b5bf89 100644
--- a/modules/commands/ns_group.cpp
+++ b/modules/commands/ns_group.cpp
@@ -111,7 +111,7 @@ class CommandNSGroup : public Command
}
NickAlias *target, *na = NickAlias::Find(u->nick);
- const Anope::string &guestnick = Config->GetBlock("options")->Get<const Anope::string>("guestnickprefix");
+ const Anope::string &guestnick = Config->GetModule("nickserv")->Get<const 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 = NickAlias::Find(nick)))
@@ -349,7 +349,7 @@ class NSGroup : public Module
NSGroup(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
commandnsgroup(this), commandnsungroup(this), commandnsglist(this)
{
- if (Config->GetBlock("options")->Get<bool>("nonicknameownership"))
+ if (Config->GetModule("nickserv")->Get<bool>("nonicknameownership"))
throw ModuleException(modname + " can not be used with options:nonicknameownership enabled");
}
};
diff --git a/modules/commands/ns_recover.cpp b/modules/commands/ns_recover.cpp
index b6cbe2621..5d66b1ad5 100644
--- a/modules/commands/ns_recover.cpp
+++ b/modules/commands/ns_recover.cpp
@@ -208,7 +208,7 @@ class NSRecover : public Module
commandnsrecover(this), recover(this, "recover")
{
- if (Config->GetBlock("options")->Get<bool>("nonicknameownership"))
+ if (Config->GetModule("nickserv")->Get<bool>("nonicknameownership"))
throw ModuleException(modname + " can not be used with options:nonicknameownership enabled");
}
diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp
index 7fd19b9d9..c7e50311d 100644
--- a/modules/commands/ns_register.cpp
+++ b/modules/commands/ns_register.cpp
@@ -56,7 +56,7 @@ class CommandNSConfirm : public Command
{
IRCD->SendLogin(source.GetUser());
const NickAlias *na = NickAlias::Find(source.GetNick());
- if (!Config->GetBlock("options")->Get<bool>("nonicknameownership") && na != NULL && na->nc == source.GetAccount() && !na->nc->HasExt("UNCONFIRMED"))
+ if (!Config->GetModule("nickserv")->Get<bool>("nonicknameownership") && na != NULL && na->nc == source.GetAccount() && !na->nc->HasExt("UNCONFIRMED"))
source.GetUser()->SetMode(source.service, "REGISTERED");
}
}
@@ -147,7 +147,7 @@ class CommandNSRegister : public Command
/* Guest nick can now have a series of between 1 and 7 digits.
* --lara
*/
- const Anope::string &guestnick = Config->GetBlock("options")->Get<const Anope::string>("guestnickprefix");
+ const Anope::string &guestnick = Config->GetModule("nickserv")->Get<const 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(NICK_CANNOT_BE_REGISTERED, u_nick.c_str());
@@ -180,7 +180,7 @@ class CommandNSRegister : public Command
source.Reply(NICK_ALREADY_REGISTERED, u_nick.c_str());
else if (pass.equals_ci(u_nick) || (Config->GetBlock("options")->Get<bool>("strictpasswords") && pass.length() < 5))
source.Reply(MORE_OBSCURE_PASSWORD);
- else if (pass.length() > Config->GetBlock("options")->Get<unsigned>("passlen"))
+ else if (pass.length() > Config->GetModule("nickserv")->Get<unsigned>("passlen", "32"))
source.Reply(PASSWORD_TOO_LONG);
else if (!email.empty() && !Mail::Validate(email))
source.Reply(MAIL_X_INVALID, email.c_str());
diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp
index 770951b8e..a1e37e15e 100644
--- a/modules/commands/ns_set.cpp
+++ b/modules/commands/ns_set.cpp
@@ -133,7 +133,7 @@ class CommandNSSetPassword : public Command
source.Reply(MORE_OBSCURE_PASSWORD);
return;
}
- else if (len > Config->GetBlock("options")->Get<unsigned>("passlen"))
+ else if (len > Config->GetModule("nickserv")->Get<unsigned>("passlen", "32"))
{
source.Reply(PASSWORD_TOO_LONG);
return;
@@ -196,7 +196,7 @@ class CommandNSSASetPassword : public Command
source.Reply(MORE_OBSCURE_PASSWORD);
return;
}
- else if (len > Config->GetBlock("options")->Get<unsigned>("passlen"))
+ else if (len > Config->GetModule("nickserv")->Get<unsigned>("passlen", "32"))
{
source.Reply(PASSWORD_TOO_LONG);
return;
@@ -332,7 +332,7 @@ class CommandNSSetDisplay : public Command
const NickAlias *user_na = NickAlias::Find(user), *na = NickAlias::Find(param);
- if (Config->GetBlock("options")->Get<bool>("nonicknameownership"))
+ if (Config->GetModule("nickserv")->Get<bool>("nonicknameownership"))
{
source.Reply(_("This command may not be used on this network because nickname ownership is disabled."));
return;
@@ -635,7 +635,7 @@ class CommandNSSetKill : public Command
return;
}
- if (Config->GetBlock("options")->Get<bool>("nonicknameownership"))
+ if (Config->GetModule("nickserv")->Get<bool>("nonicknameownership"))
{
source.Reply(_("This command may not be used on this network because nickname ownership is disabled."));
return;