[Konversation-devel] [Bug 98701] nick password not registering in some cases (described)

ismail cartman donmez ismail at kde.org.tr
Wed Mar 30 18:25:04 CEST 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=98701         
ismail kde org tr changed:

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



------- Additional Comments From ismail kde org tr  2005-03-30 18:24 -------
CVS commit by cartman: 

React to nickserv messages asking for identify. Currently identifies *twice*
at startup. Will fix it.
BUG:98701


  M +14 -9     inputfilter.cpp   1.197
  M +16 -9     server.cpp   1.447
  M +3 -1      server.h   1.196


--- kdeextragear-2/konversation/konversation/inputfilter.cpp  #1.196:1.197
 @ -381,9 +381,14  @ void InputFilter::parseClientCommand(con
                 else
                 {
-                    if(trailing.lower() == "password accepted - you are now recognized" 
+                  
+                  if(trailing.startsWith("If this is your nick")) // Nickserv
+                    {
+                      // Identify command if specified
+                      server->registerWithServices();
+                    }
+                  else if(trailing.lower() == "password accepted - you are now recognized" 
                         || trailing.lower() == "you have already identified") 
                     {
                         NickInfoPtr nickInfo = server->getNickInfo(server->getNickname());
-                        Q_ASSERT(nickInfo);
                         if(nickInfo)
                             nickInfo->setIdentified(true);

--- kdeextragear-2/konversation/konversation/server.cpp  #1.446:1.447
 @ -746,11 +746,11  @ void Server::connectionEstablished(const
      // get first notify very early
     startNotifyTimer(1000);
-    // register with services
-    if(!botPassword.isEmpty() && !bot.isEmpty())
-      queue("PRIVMSG "+bot+" :identify "+botPassword);
+    // Register with services
+    registerWithServices();
     // get own ip by userhost
     requestUserhost(nickname);
 
-    if(rejoinChannels) {
+    if(rejoinChannels)
+      {
       rejoinChannels = false;
       autoRejoinChannels();
 @ -761,4 +761,10  @ void Server::connectionEstablished(const
 }
 
+void Server::registerWithServices()
+{
+  if(!botPassword.isEmpty() && !bot.isEmpty())
+    queue("PRIVMSG "+bot+" :identify "+botPassword);
+}
+
 void Server::gotOwnResolvedHostByWelcome(KResolverResults res)
 {
 @ -2428,4 +2434,5  @ void Server::renameNickInfo(NickInfoPtr 
     QString lcNickname = nickInfo->getNickname().lower();
     nickInfo->setNickname(newname);
+    nickInfo->setIdentified(false);
     QString lcNewname = newname.lower();
     // Rename the key in m_allNicks list.
 @ -2756,5 +2763,5  @ QString Server::parseWildcards(const QSt
     out.append(toParse.mid(index,found-index)); // append part before the %
     index = found + 1; // skip the part before, including %
-    if (index >= toParse.length())
+    if (index >= (int)toParse.length())
       break; // % was the last char (not valid)
     toExpand = toParse.at(index++);

--- kdeextragear-2/konversation/konversation/server.h  #1.195:1.196
 @ -335,4 +335,6  @ class Server : public QObject
     QString allowedChannelModes() const { return m_allowedChannelModes; }
     
+    void registerWithServices();
+    
   signals:
     void nicknameChanged(const QString&);


More information about the Konversation-devel mailing list