summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-07-03 12:17:44 -0400
committerAdam <Adam@anope.org>2016-07-03 12:17:44 -0400
commitc7d5ee4becb70c8f44ca2d8882fc3df2b6d5e9db (patch)
treee103b052c1f6e371571e40cfdebaf2193b7ea949
parent4c4cc0ded7889cc65ee7faafd0e8b9c33421fd8d (diff)
Fix /ns confirm to set +r/accounts when appropriate
-rw-r--r--modules/commands/ns_register.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp
index 902facfba..ce5dbc997 100644
--- a/modules/commands/ns_register.cpp
+++ b/modules/commands/ns_register.cpp
@@ -40,6 +40,20 @@ class CommandNSConfirm : public Command
FOREACH_MOD(OnNickConfirm, (source.GetUser(), na->nc));
Log(LOG_ADMIN, source, this) << "to confirm nick " << na->nick << " (" << na->nc->display << ")";
source.Reply(_("Nick \002%s\002 has been confirmed."), na->nick.c_str());
+
+ /* Login the users online already */
+ for (std::list<User *>::iterator it = na->nc->users.begin(); it != na->nc->users.end(); ++it)
+ {
+ User *u = *it;
+
+ IRCD->SendLogin(u, na);
+
+ NickAlias *u_na = NickAlias::Find(u->nick);
+
+ /* Set +r if they're on a nick in the group */
+ if (!Config->GetModule("nickserv")->Get<bool>("nonicknameownership") && u_na && *u_na->nc == *na->nc)
+ u->SetMode(source.service, "REGISTERED");
+ }
}
}
else if (source.nc)