]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/mode.cpp
Fix for permissions :p
[user/henk/code/inspircd.git] / src / mode.cpp
index 247ef2eddab8882574d9d8485cd9880904d4ac8d..3db2a457162ac7fe26e45ac1610906a2127e5be4 100644 (file)
@@ -353,14 +353,21 @@ void ModeParser::Process(char **parameters, int pcnt, userrec *user, bool server
                         * (e.g. are they a (half)op?
                         */
 
-                       if (((!is_uline(user->server)) && (!servermode)) || (cstatus(user, targetchannel) < STATUS_HOP))
+                       if (cstatus(user, targetchannel) < STATUS_HOP)
                        {
-                               /* Not enough permission:
-                                * NOT a uline and NOT a servermode,
-                                * OR, NOT halfop or above.
-                                */
-                               WriteServ(user->fd,"482 %s %s :You're not a channel (half)operator",user->nick, targetchannel->name);
-                               return;
+                               /* We don't have halfop */
+                               log(DEBUG,"The user is not a halfop or above, checking other reasons for being able to set the modes");
+
+                               /* Are we a uline or is it a servermode? */
+                               if ((!is_uline(user->server)) && (!servermode))
+                               {
+                                       /* Not enough permission:
+                                        * NOT a uline and NOT a servermode,
+                                        * OR, NOT halfop or above.
+                                        */
+                                       WriteServ(user->fd,"482 %s %s :You're not a channel (half)operator",user->nick, targetchannel->name);
+                                       return;
+                               }
                        }
                }
                else if (targetuser)