diff options
-rw-r--r-- | src/mode.cpp | 4 |
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); |