]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Allow halfop to dehalfop themselves`
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 26 Dec 2005 13:05:44 +0000 (13:05 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 26 Dec 2005 13:05:44 +0000 (13:05 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2652 e03df62e-2008-0410-955e-edbf42e46eb7

src/mode.cpp

index de994dd5bdf3d27d941ed4316dd82f7f8178d0cd..83e79c2436d157f488227094c13b3c0468765f33 100644 (file)
@@ -318,7 +318,8 @@ char* ModeParser::TakeHops(userrec *user,char *dest,chanrec *chan,int status)
                        return NULL;
                if (MOD_RESULT == ACR_DEFAULT)
                {
-                       if ((status < STATUS_OP) && (!is_uline(user->server)))
+                       /* Tweak by Brain suggested by w00t, allow a halfop to dehalfop themselves */
+                       if ((user != d) && ((status < STATUS_OP) && (!is_uline(user->server))))
                        {
                                WriteServ(user->fd,"482 %s %s :You are not a channel operator",user->nick, chan->name);
                                return NULL;