From 8ef140900d12b332a389a58a54ed573f7f6aa741 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 29 Aug 2006 19:52:02 +0000 Subject: [PATCH] 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 --- src/mode.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.39.5