summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-05-02 12:30:01 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-05-02 12:30:01 +0000
commit7b3f2150387d9e5d9468ad2eaaacef0acc08564d (patch)
treeb8640a7ef9ad3b440b050914a8ad936cfb29e294 /src/mode.cpp
parent7d0fc076616482c78d197cfda9d5bd7e075d43d0 (diff)
Added oper-override module
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@779 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 4a7c56bd3..e7ed4badf 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -1046,7 +1046,7 @@ void handle_mode(char **parameters, int pcnt, userrec *user)
if ((dest) && (pcnt == 1))
{
- WriteServ(user->fd,"221 %s :+%s",user->nick,user->modes);
+ WriteServ(user->fd,"221 %s :+%s",dest->nick,dest->modes);
return;
}
@@ -1254,10 +1254,18 @@ void handle_mode(char **parameters, int pcnt, userrec *user)
}
}
- if ((cstatus(user,Ptr) < STATUS_HOP) && (Ptr))
- {
- WriteServ(user->fd,"482 %s %s :You must be at least a half-operator to change modes on this channel",user->nick, Ptr->name);
+ int MOD_RESULT = 0;
+ FOREACH_RESULT(OnAccessCheck(user,NULL,Ptr,AC_GENERAL_MODE));
+
+ if (MOD_RESULT == ACR_DENY)
return;
+ if (MOD_RESULT == ACR_DEFAULT)
+ {
+ if ((cstatus(user,Ptr) < STATUS_HOP) && (Ptr))
+ {
+ WriteServ(user->fd,"482 %s %s :You must be at least a half-operator to change modes on this channel",user->nick, Ptr->name);
+ return;
+ }
}
process_modes(parameters,user,Ptr,cstatus(user,Ptr),pcnt,false,false,false);