[Konversation-devel] [Bug 214258] Commands like /op and /deop cause an invalid MODE command to be send preceding a correct one

Travis McHenry wordsizzle at gmail.com
Tue Dec 15 11:17:37 CET 2009


https://bugs.kde.org/show_bug.cgi?id=214258


Travis McHenry <wordsizzle at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Travis McHenry <wordsizzle gmail com>  2009-12-15 11:17:36 ---
commit 43c80ed14c824ac0d77e19918f1da04893b3a746
Author: Travis McHenry <wordsizzle at gmail.com>
Date:   Tue Dec 15 03:15:07 2009 -0700

    Fix a bug causing an empty mode message

    It looks like the job of this if statement is to chop it off
    after 3 destinations have been added, append that to the result,
    and give the for loop a blank line to add more nicks to.The
    problem seems to arise from the fact that 0%3 is 0, so the line
    gets cut off at index 0 when no nicks have been added.
    BUG:214258

diff --git a/src/irc/outputfilter.cpp b/src/irc/outputfilter.cpp
index dbf5872..fc43d69 100644
--- a/src/irc/outputfilter.cpp
+++ b/src/irc/outputfilter.cpp
@@ -1875,7 +1875,7 @@ namespace Konversation

                 for(unsigned int index = 0; index < modeCount; index++)
                 {
-                    if((index % 3) == 0)
+                    if(index != 0 && (index % 3) == 0)
                     {
                         result.toServerList.append(token);
                         token = tmpToken;

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Konversation-devel mailing list