summaryrefslogtreecommitdiff
path: root/modules/commands/ns_register.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-10-14 12:20:07 -0400
committerAdam <Adam@anope.org>2011-10-14 12:20:07 -0400
commitddc3c2f38cf6ddc0c1f8ad82489a281e01ef50fc (patch)
tree832b02a62d2da9078b7ab5f9d4d5d99e15570294 /modules/commands/ns_register.cpp
parent53275c362c521807b70e1eb7cf936f35593dd4dc (diff)
Added options:nonicknameownership config option
Diffstat (limited to 'modules/commands/ns_register.cpp')
-rw-r--r--modules/commands/ns_register.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp
index acfcd2acd..303321551 100644
--- a/modules/commands/ns_register.cpp
+++ b/modules/commands/ns_register.cpp
@@ -53,9 +53,10 @@ class CommandNSConfirm : public Command
Log(LOG_COMMAND, u, this) << "to confirm their email";
source.Reply(_("Your email address of \002%s\002 has been confirmed."), u->Account()->email.c_str());
u->Account()->UnsetFlag(NI_UNCONFIRMED);
- ircdproto->SendAccountLogin(u, u->Account());
+
+ ircdproto->SendLogin(u);
NickAlias *na = findnick(u->nick);
- if (na && na->nc == u->Account())
+ if (!Config->NoNicknameOwnership && na != NULL && na->nc == u->Account() && na->nc->HasFlag(NI_UNCONFIRMED) == false)
u->SetMode(findbot(Config->NickServ), UMODE_REGISTERED);
}
else
@@ -199,8 +200,11 @@ class CommandNSRegister : public Command
}
}
else
- ircdproto->SendAccountLogin(u, u->Account());
- ircdproto->SetAutoIdentificationToken(u);
+ {
+ ircdproto->SendLogin(u);
+ if (!Config->NoNicknameOwnership && na->nc == u->Account() && na->nc->HasFlag(NI_UNCONFIRMED) == false)
+ u->SetMode(findbot(Config->NickServ), UMODE_REGISTERED);
+ }
u->lastnickreg = Anope::CurTime;
}