]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Don't silently drop modes that are oper only when a non-oper tries to set them -...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 29 Aug 2006 19:52:02 +0000 (19:52 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 29 Aug 2006 19:52:02 +0000 (19:52 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5073 e03df62e-2008-0410-955e-edbf42e46eb7

src/mode.cpp

index 23cbe5ccb299437b4834205a34f1ba23f73ce660..9f1b37044239933d38d9a62bbfa02883dd1cd63f 100644 (file)
@@ -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);