summaryrefslogtreecommitdiff
path: root/modules/commands/ns_group.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_group.cpp
parent53275c362c521807b70e1eb7cf936f35593dd4dc (diff)
Added options:nonicknameownership config option
Diffstat (limited to 'modules/commands/ns_group.cpp')
-rw-r--r--modules/commands/ns_group.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/commands/ns_group.cpp b/modules/commands/ns_group.cpp
index b41cad09d..6a83f4f46 100644
--- a/modules/commands/ns_group.cpp
+++ b/modules/commands/ns_group.cpp
@@ -109,10 +109,10 @@ class CommandNSGroup : public Command
na->time_registered = na->last_seen = Anope::CurTime;
u->Login(na->nc);
+ ircdproto->SendLogin(u);
+ if (!Config->NoNicknameOwnership && na->nc == u->Account() && na->nc->HasFlag(NI_UNCONFIRMED) == false)
+ u->SetMode(findbot(Config->NickServ), UMODE_REGISTERED);
FOREACH_MOD(I_OnNickGroup, OnNickGroup(u, target));
- if (target->nc->HasFlag(NI_UNCONFIRMED) == false)
- ircdproto->SendAccountLogin(u, u->Account());
- ircdproto->SetAutoIdentificationToken(u);
Log(LOG_COMMAND, u, this) << "makes " << u->nick << " join group of " << target->nick << " (" << target->nc->display << ") (email: " << (!target->nc->email.empty() ? target->nc->email : "none") << ")";
source.Reply(_("You are now in the group of \002%s\002."), target->nick.c_str());
@@ -296,6 +296,8 @@ class NSGroup : public Module
{
this->SetAuthor("Anope");
+ if (Config->NoNicknameOwnership)
+ throw ModuleException(modname + " can not be used with options:nonicknameownership enabled");
}
};