]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix for bug first noticed by zephyrus where you could send -j+ntr to a channel which...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 4 Mar 2006 23:47:25 +0000 (23:47 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 4 Mar 2006 23:47:25 +0000 (23:47 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3458 e03df62e-2008-0410-955e-edbf42e46eb7

src/mode.cpp
src/svn-rev.sh

index 2ff9e003d965e42825aa31b77630339aaf41ffd7..02da655d17927c43f8c9bd5058763f9c3a85a006 100644 (file)
@@ -1127,12 +1127,13 @@ void ModeParser::ProcessModes(char **parameters,userrec* user,chanrec *chan,int
                }
        }
 
-       /* This means the mode line is something like: "+o-", we have to take the last char off.
-       if ((*--modechar == '-') || (*modechar == '+'))
+       /* This means the mode line is something like: "+o-", we have to take the last char off. */
+       char* x = outlist + strlen(outlist) - 1;
+       while (((*x == '-') || (*x == '+')) && (x != outlist))
        {
                log(DEBUG,"Cut off trailing modifier");
-               *modechar = 0;
-       }*/
+               *x-- = 0;
+       }
        /* The mode change must be at least two characters long (+ or - and at least one mode) */
        if (((*outlist == '+') || (*outlist == '-')) && *(outlist+1))
        {
index fbf2780770717a7a9b62e929f45a0a49ab98cd68..86cc01a7367b93b8566f2b913e00d1fda538a59f 100755 (executable)
@@ -1 +1 @@
-echo 3455
+echo 3457