summaryrefslogtreecommitdiff
path: root/modules/commands/ns_register.cpp
diff options
context:
space:
mode:
authorDukePyrolator <DukePyrolator@anope.org>2013-10-16 06:03:48 +0200
committerDukePyrolator <DukePyrolator@anope.org>2013-10-26 18:33:07 +0200
commit2cfc97053faba7582cd57701900de78ebacb12ce (patch)
treef72e04a159fb5a0e359aeebcf32e9f30a7b7c111 /modules/commands/ns_register.cpp
parent6cde65a57f60228d15a9d993a31ecf9bf624f592 (diff)
moved some config options from example.conf to nickserv.example.conf
Diffstat (limited to 'modules/commands/ns_register.cpp')
-rw-r--r--modules/commands/ns_register.cpp6
1 files changed, 3 insertions, 3 deletions
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());