summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-05-30 10:54:54 -0400
committerAdam <Adam@anope.org>2014-05-30 15:16:03 -0400
commitd6e600f74baede47c073dd4032eb7d6427421e0d (patch)
tree977f257c3642f03c28e446b0a5a846aaa08ef9d8
parent5f7113bc0e60be25919a6b8ab4ab59b574d3e960 (diff)
Fix access check in ns_group
-rw-r--r--modules/commands/ns_group.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/commands/ns_group.cpp b/modules/commands/ns_group.cpp
index 9b3f425e9..11e4091cd 100644
--- a/modules/commands/ns_group.cpp
+++ b/modules/commands/ns_group.cpp
@@ -139,12 +139,12 @@ class CommandNSGroup : public Command
Log(LOG_COMMAND, source, this) << "and tried to group to SUSPENDED nick " << target->nick;
source.Reply(NICK_X_SUSPENDED, target->nick.c_str());
}
+ else if (na && Config->GetModule(this->owner)->Get<bool>("nogroupchange"))
+ source.Reply(_("Your nick is already registered."));
else if (na && *target->nc == *na->nc)
source.Reply(_("You are already a member of the group of \002%s\002."), target->nick.c_str());
else if (na && na->nc != u->Account())
source.Reply(NICK_IDENTIFY_REQUIRED);
- else if (na && Config->GetModule(this->owner)->Get<bool>("nogroupchange"))
- source.Reply(_("Your nick is already registered."));
else if (maxaliases && target->nc->aliases->size() >= maxaliases && !target->nc->IsServicesOper())
source.Reply(_("There are too many nicks in your group."));
else if (u->nick.length() <= guestnick.length() + 7 &&
@@ -156,7 +156,7 @@ class CommandNSGroup : public Command
else
{
bool ok = false;
- if (!na && u->Account())
+ if (!na && u->Account() == target->nc)
ok = true;
NSCertList *cl = target->nc->GetExt<NSCertList>("certificates");