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

void KNateon::slotDeleteFriend ( DeleteForm *  pDeleteForm  )  [private, slot]

버디 삭제 다이얼로그 로부터...

Group의 BuddyList에서 삭제된 버디 handle을 삭제한다. 이후 복사/이동에서 목록에 있어서 Skip 되는것을 방지한다.

Definition at line 5734 of file knateon.cpp.

References BuddyList::getBuddyByID(), CurrentAccount::getBuddyList(), GroupList::getGroupByID(), NateonDPConnection::getGroupCache(), CurrentAccount::getGroupList(), BuddyBase::getHandle(), GroupList::isContain(), Group::removeBuddy(), NateonConnection::sendCommand(), BuddyBase::setBL(), BuddyBase::setFL(), KNateonMainview::slotEmoticonList(), and nmconfig::viewemoticonlist.

Referenced by slotDeleteBuddy().

{
      /*!
     * Group의 BuddyList에서 삭제된 버디 handle을 삭제한다.
     * 이후 복사/이동에서 목록에 있어서 Skip 되는것을 방지한다.
     */
      Group *pGroup = m_pCurrentAccount->getGroupList()->getGroupByID( pDeleteForm->getGID() );
      if ( pGroup )
            pGroup->removeBuddy( m_pCurrentAccount->getBuddyList()->getBuddyByID( pDeleteForm->getUID() ) );

      QString sBody;
      sBody = "0";
      sBody += " ";
      sBody += pDeleteForm->getHandle();
      sBody += " ";
      sBody += pDeleteForm->getUID();
      sBody += " ";
      sBody += pDeleteForm->getGID();
      sBody += "\r\n";

      QString sCommand;
      sCommand = QString::number( m_pDPcon->getGroupCache() );
      sCommand += " ";
      sCommand += QString::number( sBody.length() );
      sCommand += "\r\n";
      sCommand += sBody;
      
      m_pDPcon->sendCommand( "RMBG", sCommand );

      if ( !m_pCurrentAccount->getGroupList()->isContain( m_pCurrentAccount->getBuddyList()->getBuddyByID( pDeleteForm->getUID() ) ) )
      {
            Buddy *pBuddy = m_pCurrentAccount->getBuddyList()->getBuddyByID( pDeleteForm->getUID() );
            if ( pBuddy )
            {
                  QString sCommand;
                  sCommand += "FL";
                  sCommand += " ";
                  sCommand += pDeleteForm->getHandle();
                  sCommand += " ";
                  sCommand += pDeleteForm->getUID();
                  sCommand += " ";
                  sCommand += "0";
                  sCommand += "\r\n";
                  m_pDPcon->sendCommand( "RMVB", sCommand );
                  pBuddy->setFL( FALSE );
            }
      }
      
      if ( pDeleteForm->isLocked() )
      {
            Buddy *pBuddy = m_pCurrentAccount->getBuddyList()->getBuddyByID( pDeleteForm->getUID() );
            if ( pBuddy )
            {
                  QString sCommand;
                  sCommand += "BL";
                  sCommand += " ";
                  sCommand += pDeleteForm->getHandle();
                  sCommand += " ";
                  sCommand += pDeleteForm->getUID();
                  sCommand += "\r\n";
                  m_pDPcon->sendCommand( "ADDB", sCommand );
                  pBuddy->setBL( TRUE );
            }
      }
      m_pMainView->slotEmoticonList( stConfig.viewemoticonlist );
}


Generated by  Doxygen 1.6.0   Back to index