summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-29 19:52:02 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-29 19:52:02 +0000
commit8ef140900d12b332a389a58a54ed573f7f6aa741 (patch)
tree36792077979424d0c5f3a05282239976874ccdbd /src/mode.cpp
parent0213e5c91077918090cac84480586e694a590a12 (diff)
Don't silently drop modes that are oper only when a non-oper tries to set them - give a 481
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5073 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 23cbe5ccb..9f1b37044 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -431,7 +431,11 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
* eat any parameter that came with the mode, and continue to next
*/
if ((IS_LOCAL(user)) && (modehandlers[handler_id]->NeedsOper()) && (!*user->oper))
+ {
+ user->WriteServ("481 %s :Permission Denied- Only operators may set %s mode %c", user->nick,
+ type == MODETYPE_CHANNEL ? "channel" : "user", modehandlers[handler_id]->GetModeChar());
continue;
+ }
/* Call the handler for the mode */
ModeAction ma = modehandlers[handler_id]->OnModeChange(user, targetuser, targetchannel, parameter, adding);