All pastes #77504 Raw Edit

nocolon-nick.patch

public text v1 · immutable
·published 2006-07-03 02:57 UTC
rendered paste body
--- konversation/src/inputfilter.cpp    (revision 557361)
+++ konversation/src/inputfilter.cpp    (working copy)
@@ -547,10 +547,16 @@
     }
     else if(command=="nick")
     {
-        server->renameNick(sourceNick,trailing);
+        QString newNick(trailing);
+        // Sometimes NICK comes without ":" in front of the new nick
+        if(newNick.isEmpty())
+        {
+            newNick=parameterList[parameterList.count()-1];
+        }
+        server->renameNick(sourceNick,newNick);
         if(sourceNick != server->getNickname())
         {
-            konv_app->notificationHandler()->nickChange(server->getStatusView(), sourceNick, trailing);
+            konv_app->notificationHandler()->nickChange(server->getStatusView(), sourceNick, newNick);
         }
     }
     else if(command=="topic")