From dd43402365ac82e6f28d373ea857a38f473e9f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 10 Dec 2019 01:24:17 +0100 Subject: kopete: Restore the AIM protocol because a replacement AIM server was created. This reverts commits 036b0229db and dc34f9c391. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 91ba38a1df42b56caa73babc90ffa4f674c000d4) --- kopete/protocols/oscar/oscaraccount.cpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'kopete/protocols/oscar/oscaraccount.cpp') diff --git a/kopete/protocols/oscar/oscaraccount.cpp b/kopete/protocols/oscar/oscaraccount.cpp index a28a8035..b74a12e7 100644 --- a/kopete/protocols/oscar/oscaraccount.cpp +++ b/kopete/protocols/oscar/oscaraccount.cpp @@ -95,17 +95,21 @@ public: }; OscarAccount::OscarAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name, bool isICQ) -: Kopete::PasswordedAccount( parent, accountID, 8, name ) +: Kopete::PasswordedAccount( parent, accountID, isICQ ? 8 : 16, name ) { kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << " accountID='" << accountID << "', isICQ=" << isICQ << endl; d = new OscarAccountPrivate( *this ); d->engine = new Client( this ); - + d->engine->setIsIcq( isICQ ); + d->versionAlreadyUpdated = false; d->versionUpdaterStamp = OscarVersionUpdater::self()->stamp(); - d->engine->setVersion( OscarVersionUpdater::self()->getICQVersion() ); + if ( isICQ ) + d->engine->setVersion( OscarVersionUpdater::self()->getICQVersion() ); + else + d->engine->setVersion( OscarVersionUpdater::self()->getAIMVersion() ); d->engine->setCodecProvider( d ); d->olnscDialog = 0L; @@ -178,6 +182,13 @@ void OscarAccount::loginActions() kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "processing SSI list" << endl; processSSIList(); + //start a chat nav connection + if ( !engine()->isIcq() ) + { + kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "sending request for chat nav service" << endl; + d->engine->requestServerRedirect( 0x000D ); + } + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "sending request for icon service" << endl; d->engine->requestServerRedirect( 0x0010 ); @@ -462,7 +473,7 @@ void OscarAccount::setBuddyIcon( KURL url ) if ( image.isNull() ) return; - const TQSize size = TQSize( 52, 64 ); + const TQSize size = ( d->engine->isIcq() ) ? TQSize( 52, 64 ) : TQSize( 48, 48 ); image = image.smoothScale( size, TQ_ScaleMax ); if( image.width() > size.width()) @@ -794,8 +805,9 @@ void OscarAccount::slotSendBuddyIcon() TQString OscarAccount::getFLAPErrorMessage( int code ) { - TQString acctType = i18n("ICQ"); - TQString acctDescription = i18n("ICQ user id", "UIN"); + bool isICQ = d->engine->isIcq(); + TQString acctType = isICQ ? i18n("ICQ") : i18n("AIM"); + TQString acctDescription = isICQ ? i18n("ICQ user id", "UIN") : i18n("AIM user id", "screen name"); TQString reason; //FLAP errors are always fatal //negative codes are things added by liboscar developers -- cgit v1.2.1