summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-08 15:17:42 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-08 15:17:42 +0000
commit2b2677dec55fafa85a19e7d84b539c239a50187c (patch)
tree47d8a5ad7b869c07b2e44099e90c551b9c5b5856 /src
parentd2cc26fb379dca9c74c6068bc33aaaae6beece6e (diff)
Fix for permissions :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4168 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/mode.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 247ef2edd..3db2a4571 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -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)