1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 20:46:39 +02:00

Fix access check in ns_group

This commit is contained in:
Adam
2014-05-30 10:54:54 -04:00
parent 5f7113bc0e
commit d6e600f74b
+3 -3
View File
@@ -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");