Logo Search packages:      
Sourcecode: nateon version File versions  Download package

void KNateon::gotINVT ( const QStringList &  slCommand  )  [private, slot]

connection이 Success되었다고 해 정말 접속이 된것이 아님. KExtendedSocket 의 connectionSuccess() signal을 받아야 정말 접속이 된것임.

비버디이고, 허용된 친구에게만 대화 받기로 되있는 경우

RESS를 보내고 결과로 받은 TID를 생성한 chatview에 저장한다. TID는 위젯을 찾을때 사용한다.

<<<<====

Definition at line 2065 of file knateon.cpp.

References nmconfig::allowonlypermitchat, createChat(), BuddyList::getBuddyByID(), CurrentAccount::getBuddyList(), ChatList::getChatViewByUID(), CurrentAccount::getMyCyworldID(), CurrentAccount::getMyNateID(), NateonDPConnection::getTID(), NateonConnection::getUserID(), nmconfig::logintype, m_pChatList, and NateonConnection::sendCommand().

Referenced by initializeNateonDPConnection().

{
      Buddy *pBuddy;

      ChatView *pChat = m_pChatList->getChatViewByUID( slCommand[1] );
      if ( pChat ) {
            pChat->disconnectFromServerSS();
            pChat->setServer( slCommand[2] );
            pChat->setPort( slCommand[3].toInt() );
            pChat->setAuthKey( slCommand[4] );
            pChat->setID(m_pDPcon->getUserID());

            if (pChat->connectToServerSS())
                  kdDebug() << "Connection Success!!!" << endl; 
            else
                  kdDebug() << "2. Connection Error!!!" << endl;
            /// connection이 Success되었다고 해 정말 접속이 된것이 아님.
            /// KExtendedSocket 의 connectionSuccess() signal을 받아야 정말 접속이 된것임.
      } else {
            m_pBuddyList = m_pCurrentAccount->getBuddyList(); 
            pBuddy = m_pBuddyList->getBuddyByID(slCommand[1]);
    
            /*!
             * 비버디이고, 허용된 친구에게만 대화 받기로 되있는 경우
             */
            if ( stConfig.allowonlypermitchat && !pBuddy )
            {
                  QString sBody;
                  sBody = "INCK";
                  sBody += " ";
                  if ( stConfig.logintype == 'C' )
                        sBody += m_pCurrentAccount->getMyCyworldID();
                  else
                        sBody += m_pCurrentAccount->getMyNateID();
                  sBody += " ";
                  sBody += slCommand[4];
                  // sBody += "\r\n";
      
                  QString sCommand;
                  sCommand = slCommand[1];
                  sCommand += " ";
                  sCommand += "N";
                  sCommand += " ";
                  sCommand += QString::number( sBody.length() );
                  sCommand += "\r\n";
                  sCommand += sBody;
      
                  m_pDPcon->sendCommand( "CTOC", sCommand );
      
                  return;
            }
    
            /// RESS를 보내고 결과로 받은 TID를 생성한 chatview에 저장한다.
            /// TID는 위젯을 찾을때 사용한다.
            pChat = createChat( m_pDPcon->getTID() );
            pChat->addBuddy( slCommand[1], TRUE ); /// <<<<====
            pChat->setServer( slCommand[2] );
            pChat->setPort( slCommand[3].toInt() );
            pChat->setAuthKey( slCommand[4] );
            pChat->setID(m_pDPcon->getUserID());

            if (pChat->connectToServerSS())
                  kdDebug() << "Connection Success!!!" << endl;
            else
                  kdDebug() << "3. Connection Error!!!" << endl;
      }
}


Generated by  Doxygen 1.6.0   Back to index