From 21ecfd0e4bf6484c0a5d1a59b64635c8dce7c0bb Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 6 Oct 2016 14:07:11 -0400 Subject: Fix /ns confirm to set +r/accounts when appropriate --- modules/nickserv/register.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'modules/nickserv') 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("nonicknameownership") && u_na && u_na->GetAccount() == na->GetAccount()) + u->SetMode(source.service, "REGISTERED"); + } } else if (source.nc) { -- cgit