summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-10-06 14:07:11 -0400
committerAdam <Adam@anope.org>2016-10-06 14:07:11 -0400
commit21ecfd0e4bf6484c0a5d1a59b64635c8dce7c0bb (patch)
tree38f140aed5355f35459ab012eb0d05a99b0cf688
parent8d7c21da074f379eedffabd04d1a9c3516280d9e (diff)
Fix /ns confirm to set +r/accounts when appropriate
-rw-r--r--modules/nickserv/register.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/nickserv/register.cpp b/modules/nickserv/register.cpp
index f7e93c9a1..02da01f5d 100644
--- a/modules/nickserv/register.cpp
+++ b/modules/nickserv/register.cpp
@@ -55,6 +55,18 @@ class CommandNSConfirm : public Command
EventManager::Get()->Dispatch(&NickServ::Event::NickConfirm::OnNickConfirm, source.GetUser(), na->GetAccount());
Log(LOG_ADMIN, source, this) << "to confirm nick " << na->GetNick() << " (" << na->GetAccount()->GetDisplay() << ")";
source.Reply(_("\002{0}\002 has been confirmed."), na->GetNick());
+
+ /* Login the users online already */
+ for (User *u : na->GetAccount()->users)
+ {
+ IRCD->SendLogin(u, na);
+
+ NickServ::Nick *u_na = NickServ::FindNick(u->nick);
+
+ /* Set +r if they're on a nick in the group */
+ if (!Config->GetModule("nickserv")->Get<bool>("nonicknameownership") && u_na && u_na->GetAccount() == na->GetAccount())
+ u->SetMode(source.service, "REGISTERED");
+ }
}
else if (source.nc)
{