]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/mode.cpp
Change string for Om <3
[user/henk/code/inspircd.git] / src / mode.cpp
index 063b14fc44936e5d30bdaf9846d0e2d93f45fac9..6b22587b186698d204d6700df2e4905d84bfe789 100644 (file)
@@ -387,6 +387,8 @@ void ModeParser::Process(const char** parameters, int pcnt, User *user, bool ser
        }
        else if (pcnt > 1)
        {
+               bool SkipAccessChecks = false;
+
                if (targetchannel)
                {
                        type = MODETYPE_CHANNEL;
@@ -403,6 +405,7 @@ void ModeParser::Process(const char** parameters, int pcnt, User *user, bool ser
                                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)
@@ -516,7 +519,7 @@ void ModeParser::Process(const char** parameters, int pcnt, User *user, bool ser
                                                        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 */
@@ -546,7 +549,7 @@ void ModeParser::Process(const char** parameters, int pcnt, User *user, bool ser
                                                                        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;
                                                                        }