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

void KNateon::slotBlockBuddy (  )  [private, slot]

버디 블럭

친구 차단/친구 차단 해제

BL == 1

친구 차단 해제

sCommand => "CMN NateID"

친구 차단

sCommand => "CMN NateID"

차단된것 목록 refresh

Definition at line 4146 of file knateon.cpp.

References BuddyList::getBuddyByHandle(), ChatList::getChatList(), KNateonMainview::getCurrentItem(), BuddyBase::getHandle(), BuddyBase::getUID(), BuddyBase::isAL(), BuddyBase::isBL(), BuddyBase::isFL(), BuddyBase::isRL(), m_pChatList, NateonDPConnection::putLock(), NateonDPConnection::putUnlock(), BuddyBase::setBL(), KNateonMainview::slotEmoticonList(), and nmconfig::viewemoticonlist.

Referenced by connected(), and createChat().

{
      QListViewItem *pItem = m_pMainView->getCurrentItem();
      Buddy *pBuddy = m_pBuddyList->getBuddyByHandle( pItem->text(2) );

      QString sCommand( pBuddy->getHandle() );
      sCommand += " ";
      sCommand += pBuddy->getUID();

      /*! 친구 차단/친구 차단 해제 */
      /*! BL == 1 */
      if ( pBuddy->isBL() == true )
      {
            /*! 친구 차단 해제 */
            /*! sCommand => "CMN NateID" */
            m_pDPcon->putUnlock( sCommand );
            pBuddy->setBL( false );
      }
      else
      {
            /*! 친구 차단 */
            KMessageBox::information (this, UTF8("차단을 하시면 차단된 사람은 나의 온라인 상태 정보를 볼 수 없게 되며, 동시에 내 [미니홈피]와 [파일방]에도 접근할 수 없게 됩니다.\n(단, 미니홈피 설정이 \"전체공개\"인 경우 제외)"), UTF8("친구 차단"), UTF8("blockmsg"), KMessageBox::Notify);

            /*! sCommand => "CMN NateID" */
            m_pDPcon->putLock( sCommand );
            pBuddy->setBL( true );
      }
  
  
      QPtrList<ChatView> m_ChatObjs = m_pChatList->getChatList();
      QPtrListIterator<ChatView> iterator(m_ChatObjs);
      ChatView* pChatView;
  
      while(iterator.current() != 0)
      {
            pChatView = iterator.current();
            if ( pChatView->getBuddyByID( pBuddy->getUID() ) )
            {
                  QString sFlag;
                  if ( pBuddy->isFL() )
                        sFlag = "1";
                  else
                        sFlag = "0";
                  if ( pBuddy->isAL() )
                        sFlag += "10";
                  else
                        sFlag += "01";
                  if ( pBuddy->isRL() )
                        sFlag += "1";
                  else
                        sFlag += "0";
                  
                  pChatView->updateUserFlag( pBuddy->getUID(), sFlag );
            }
            ++iterator;
      }
      /*!
       * 차단된것 목록 refresh
       */
      m_pMainView->slotEmoticonList( stConfig.viewemoticonlist );
}


Generated by  Doxygen 1.6.0   Back to index