Пример #1
0
void AIMContact::updateAwayMessage( const QString& contact, const QString& message )
{
	if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) )
		return;
	else
	{
		if ( message.isEmpty() )
		{
			removeProperty( mProtocol->awayMessage );
			if ( !m_mobile )
				setOnlineStatus( mProtocol->statusOnline );
			else
				setOnlineStatus( mProtocol->statusWirelessOnline );
			m_haveAwayMessage = false;
		}
		else
		{
			m_haveAwayMessage = true;
			setAwayMessage( message );
			if ( !m_mobile )
				setOnlineStatus( mProtocol->statusAway );
			else
				setOnlineStatus( mProtocol->statusWirelessAway );
		}
	}

	emit updatedProfile();
}
void Identity::copy(const Identity& original)
{
    setName(original.getName());
    setRealName(original.getRealName());
    setIdent(original.getIdent());
    setNicknameList(original.getNicknameList());
    setAuthType(original.getAuthType());
    setAuthPassword(original.getAuthPassword());
    setNickservNickname(original.getNickservNickname());
    setNickservCommand(original.getNickservCommand());
    setSaslAccount(original.getSaslAccount());
    setPemClientCertFile(original.getPemClientCertFile());
    setQuitReason(original.getQuitReason());
    setPartReason(original.getPartReason());
    setKickReason(original.getKickReason());
    setInsertRememberLineOnAway(original.getInsertRememberLineOnAway());
    setRunAwayCommands(original.getRunAwayCommands());
    setAwayCommand(original.getAwayCommand());
    setAwayMessage(original.getAwayMessage());
    setAwayNickname(original.getAwayNickname());
    setReturnCommand(original.getReturnCommand());
    setAutomaticAway(original.getAutomaticAway());
    setAwayInactivity(original.getAwayInactivity());
    setAutomaticUnaway(original.getAutomaticUnaway());
    setShellCommand(original.getShellCommand());
    setCodecName(original.getCodecName());
}
Пример #3
0
void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& details )
{
    if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) )
        return;

    kDebug(OSCAR_ICQ_DEBUG) << contact;

    //if they don't have an SSI alias, make sure we use the capitalization from the
    //server so their contact id looks all pretty.
    QString nickname = property( Kopete::Global::Properties::self()->nickName() ).value().toString();
    if ( nickname.isEmpty() || Oscar::normalize( nickname ) == Oscar::normalize( contact ) )
        setNickName( contact );

    kDebug( OSCAR_ICQ_DEBUG ) << "extendedStatus is " << details.extendedStatus();
    Oscar::Presence presence = mProtocol->statusManager()->presenceOf( details.extendedStatus(), details.userClass() );
    setPresenceTarget( presence );

    m_mobile = ( presence.flags() & Oscar::Presence::Wireless );

    setAwayMessage( details.personalMessage() );
    if ( presence.type() != Oscar::Presence::Online && m_details.awaySinceTime() < details.awaySinceTime() ) //prevent cyclic away message requests
    {
        mAccount->engine()->requestAIMAwayMessage( contactId() );
    }

    OscarContact::userInfoUpdated( contact, details );
}
Пример #4
0
void Identity::init()
{
    setCodecName(Konversation::IRCCharsets::self()->encodingForLocale());

    setInsertRememberLineOnAway(false);

    setQuitReason("Konversation terminated!");
    setPartReason("Konversation terminated!");
    setKickReason("User terminated!");

    setShowAwayMessage(false);
    setAwayMessage("/me is away: %s");
    setReturnMessage("/me is back.");

    setAutomaticAway(false);
    setAwayInactivity(10);
    setAutomaticUnaway(false);
}
Пример #5
0
void Identity::copy(const Identity& original)
{
    setName(original.getName());
    setRealName(original.getRealName());
    setIdent(original.getIdent());
    setNicknameList(original.getNicknameList());
    setBot(original.getBot());
    setPassword(original.getPassword());
    setQuitReason(original.getQuitReason());
    setPartReason(original.getPartReason());
    setKickReason(original.getKickReason());
    setInsertRememberLineOnAway(original.getInsertRememberLineOnAway());
    setShowAwayMessage(original.getShowAwayMessage());
    setAwayMessage(original.getAwayMessage());
    setAwayNick(original.getAwayNick());
    setReturnMessage(original.getReturnMessage());
    setAutomaticAway(original.getAutomaticAway());
    setAwayInactivity(original.getAwayInactivity());
    setAutomaticUnaway(original.getAutomaticUnaway());
    setShellCommand(original.getShellCommand());
    setCodecName(original.getCodecName());
}
void Identity::init()
{
    setAuthType(QStringLiteral("nickserv"));
    setNickservNickname(QStringLiteral("nickserv"));
    setNickservCommand(QStringLiteral("identify"));

    setCodecName(Konversation::IRCCharsets::self()->encodingForLocale());

    setInsertRememberLineOnAway(false);

    setQuitReason(QStringLiteral("Konversation terminated!"));
    setPartReason(QStringLiteral("Konversation terminated!"));
    setKickReason(QStringLiteral("User terminated!"));

    setAwayMessage(QStringLiteral("Gone away for now"));

    setRunAwayCommands(false);

    setAutomaticAway(false);
    setAwayInactivity(10);
    setAutomaticUnaway(false);
}
Пример #7
0
void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& details )
{
	if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) )
		return;

	kDebug(OSCAR_ICQ_DEBUG) << contact;

	setNickName( contact );

	kDebug( OSCAR_ICQ_DEBUG ) << "extendedStatus is " << details.extendedStatus();
	Oscar::Presence presence = mProtocol->statusManager()->presenceOf( details.extendedStatus(), details.userClass() );
	setPresenceTarget( presence );

	m_mobile = ( presence.flags() & Oscar::Presence::Wireless );

	setAwayMessage( details.personalMessage() );
	if ( presence.type() != Oscar::Presence::Online && m_details.awaySinceTime() < details.awaySinceTime() ) //prevent cyclic away message requests
	{
		mAccount->engine()->requestAIMAwayMessage( contactId() );
	}

	OscarContact::userInfoUpdated( contact, details );
}