From: brain Date: Tue, 29 Aug 2006 19:52:02 +0000 (+0000) Subject: Don't silently drop modes that are oper only when a non-oper tries to set them -... X-Git-Tag: v2.0.23~7267 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=8ef140900d12b332a389a58a54ed573f7f6aa741;p=user%2Fhenk%2Fcode%2Finspircd.git 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 --- 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);