}
else if (pcnt > 1)
{
+ bool SkipAccessChecks = false;
+
if (targetchannel)
{
type = MODETYPE_CHANNEL;
FOREACH_RESULT(I_OnAccessCheck,OnAccessCheck(user, NULL, targetchannel, AC_GENERAL_MODE));
if (MOD_RESULT == ACR_DENY)
return;
+ SkipAccessChecks = (MOD_RESULT == ACR_ALLOW);
}
}
else if (targetuser)
if (IS_LOCAL(user) && (MOD_RESULT == ACR_DENY))
continue;
- if (IS_LOCAL(user) && (MOD_RESULT != ACR_ALLOW))
+ if (!SkipAccessChecks && IS_LOCAL(user) && (MOD_RESULT != ACR_ALLOW))
{
ServerInstance->Log(DEBUG,"Enter minimum prefix check");
/* Check access to this mode character */
if (!ourmode || ourmode->GetPrefixRank() < neededrank)
{
/* Bog off */
- user->WriteServ("482 %s %s :You require channel privilege %c or above to %sset channel mode %c",
+ user->WriteServ("482 %s %s :You must have channel privilege %c or above to %sset channel mode %c",
user->nick, targetchannel->name, needed, adding ? "" : "un", modechar);
continue;
}