=================================================================== RCS file: /home/kde/kdenetwork/kopete/protocols/oscar/aim/aimcontact.cpp,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- kdenetwork/kopete/protocols/oscar/aim/aimcontact.cpp 2005/03/01 02:53:37 1.70 +++ kdenetwork/kopete/protocols/oscar/aim/aimcontact.cpp 2005/03/03 12:28:51 1.71 @@ -147,7 +147,7 @@ void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& details ) { - if ( contact.lower() != contactId().lower() ) + if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << contact << endl; @@ -181,7 +181,7 @@ void AIMContact::userOnline( const QString& userId ) { - if ( userId.lower() == contactId().lower() ) + if ( Oscar::normalize( userId ) == Oscar::normalize( contactId() ) ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Getting more contact info" << endl; setOnlineStatus( mProtocol->statusOnline ); @@ -199,7 +199,7 @@ void AIMContact::updateAwayMessage( const QString& contact, const QString& message ) { - if ( contact.lower() != contactId().lower() ) + if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; else { @@ -222,7 +222,7 @@ void AIMContact::updateProfile( const QString& contact, const QString& profile ) { - if ( contact.lower() != contactId().lower() ) + if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; setProperty( mProtocol->clientProfile, profile ); =================================================================== RCS file: /home/kde/kdenetwork/kopete/protocols/oscar/icq/icqcontact.cpp,v retrieving revision 1.72 retrieving revision 1.73 diff -u -r1.72 -r1.73 --- kdenetwork/kopete/protocols/oscar/icq/icqcontact.cpp 2005/02/02 14:06:00 1.72 +++ kdenetwork/kopete/protocols/oscar/icq/icqcontact.cpp 2005/03/03 12:28:51 1.73 @@ -106,7 +106,7 @@ void ICQContact::userOnline( const QString& userId ) { - if ( userId != contactId() ) + if ( Oscar::normalize( userId ) != Oscar::normalize( contactId() ) ) return; kdDebug(OSCAR_ICQ_DEBUG) << "Setting " << userId << " online" << endl; @@ -116,7 +116,7 @@ void ICQContact::userOffline( const QString& userId ) { - if ( userId != contactId() ) + if ( Oscar::normalize( userId ) != Oscar::normalize( contactId() ) ) return; kdDebug(OSCAR_ICQ_DEBUG) << "Setting " << userId << " offline" << endl; @@ -130,7 +130,7 @@ setOnlineStatus( mProtocol->statusManager()->waitingForAuth() ); QString nickname = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); - if ( nickname.isEmpty() || nickname == contactId() ) + if ( nickname.isEmpty() || Oscar::normalize( nickname ) == Oscar::normalize( contactId() ) ) { int time = ( KApplication::random() % 25 ) * 1000; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating nickname in " << time/1000 << " seconds" << endl; @@ -164,7 +164,7 @@ void ICQContact::slotGotAuthReply( const QString& contact, const QString& reason, bool granted ) { - if ( contact != contactId() ) + if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << endl; @@ -189,7 +189,7 @@ void ICQContact::slotGotAuthRequest( const QString& contact, const QString& reason ) { - if ( contact != contactId() ) + if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; ICQAuthReplyDialog replyDialog; @@ -202,7 +202,7 @@ void ICQContact::receivedLongInfo( const QString& contact ) { - if ( contact.lower() != contactId().lower() ) + if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) { if ( m_infoWidget ) m_infoWidget->delayedDestruct(); @@ -224,7 +224,7 @@ void ICQContact::receivedShortInfo( const QString& contact ) { - if ( contact != contactId() ) + if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; ICQShortInfo shortInfo = mAccount->engine()->getShortInfo( contact ); =================================================================== RCS file: /home/kde/kdenetwork/kopete/protocols/oscar/liboscar/ssiauthtask.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- kdenetwork/kopete/protocols/oscar/liboscar/ssiauthtask.cpp 2005/01/30 15:09:38 1.3 +++ kdenetwork/kopete/protocols/oscar/liboscar/ssiauthtask.cpp 2005/03/03 12:28:52 1.4 @@ -21,6 +21,7 @@ #include "transfer.h" #include "buffer.h" #include "connection.h" +#include "oscarutils.h" #include @@ -135,7 +136,7 @@ { Buffer* buf = transfer()->buffer(); - QString uin = buf->getBUIN(); + QString uin = Oscar::normalize( buf->getBUIN() ); QString reason = buf->getBSTR(); buf->getWord(); // 0x0000 - Unknown @@ -149,7 +150,7 @@ { Buffer* buf = transfer()->buffer(); - QString uin = buf->getBUIN(); + QString uin = Oscar::normalize( buf->getBUIN() ); QString reason = buf->getBSTR(); buf->getWord(); // 0x0000 - Unknown @@ -164,7 +165,7 @@ { Buffer* buf = transfer()->buffer(); - QString uin = buf->getBUIN(); + QString uin = Oscar::normalize( buf->getBUIN() ); bool accepted = buf->getByte(); QString reason = buf->getBSTR(); @@ -186,7 +187,7 @@ { Buffer* buf = transfer()->buffer(); - QString uin = buf->getBUIN(); + QString uin = Oscar::normalize( buf->getBUIN() ); kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "User " << uin << " added you to the contact list" << endl; emit contactAddedYou( uin ); =================================================================== RCS file: /home/kde/kdenetwork/kopete/protocols/oscar/liboscar/ssilisttask.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- kdenetwork/kopete/protocols/oscar/liboscar/ssilisttask.cpp 2005/01/25 15:10:19 1.2 +++ kdenetwork/kopete/protocols/oscar/liboscar/ssilisttask.cpp 2005/03/03 12:28:52 1.3 @@ -110,6 +110,9 @@ tlvList.append( t ); } + if ( itemType == ROSTER_CONTACT ) + itemName = Oscar::normalize( itemName ); + Oscar::SSI s( itemName, groupId, itemId, itemType, tlvList ); s.setTLVListLength( tlvLength ); =================================================================== RCS file: /home/kde/kdenetwork/kopete/protocols/oscar/liboscar/ssimodifytask.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- kdenetwork/kopete/protocols/oscar/liboscar/ssimodifytask.cpp 2005/02/01 19:41:08 1.4 +++ kdenetwork/kopete/protocols/oscar/liboscar/ssimodifytask.cpp 2005/03/03 12:28:52 1.5 @@ -41,7 +41,7 @@ { } -void SSIModifyTask::onGo( ) +void SSIModifyTask::onGo() { sendSSIUpdate(); } @@ -62,7 +62,10 @@ { m_opType = Add; m_opSubject = Contact; - Oscar::SSI oldItem = m_ssiManager->findContact( contact ); + + QString newContact = Oscar::normalize( contact ); + + Oscar::SSI oldItem = m_ssiManager->findContact( newContact ); Oscar::SSI groupItem = m_ssiManager->findGroup( group ); if ( !groupItem ) @@ -81,7 +84,7 @@ } kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "creating new SSI item for " << contact << " in group " << group << endl; - Oscar::SSI newItem( contact, groupItem.gid(), m_ssiManager->nextContactId(), ROSTER_CONTACT, tlvList ); + Oscar::SSI newItem( newContact, groupItem.gid(), m_ssiManager->nextContactId(), ROSTER_CONTACT, tlvList ); m_newItem = newItem; return true; } @@ -90,7 +93,7 @@ { m_opType = Remove; m_opSubject = Contact; - m_oldItem = m_ssiManager->findContact( contact ); + m_oldItem = m_ssiManager->findContact( Oscar::normalize( contact ) ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Scheduling" << m_oldItem.name() << " for removal" << endl; return true; } @@ -99,7 +102,7 @@ { m_opType = Change; m_opSubject = Group; - m_oldItem = m_ssiManager->findContact( contact ); + m_oldItem = m_ssiManager->findContact( Oscar::normalize( contact ) ); Oscar::SSI oldGroupItem; if ( m_oldItem.isValid() ) oldGroupItem = m_ssiManager->findGroup( newGroup ); @@ -138,7 +141,7 @@ return true; } -bool SSIModifyTask::removeGroup( const QString & groupName ) +bool SSIModifyTask::removeGroup( const QString& groupName ) { m_opType = Remove; m_opSubject = Group;