summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/irc/ircusercontact.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/irc/ircusercontact.cpp')
-rw-r--r--kopete/protocols/irc/ircusercontact.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/kopete/protocols/irc/ircusercontact.cpp b/kopete/protocols/irc/ircusercontact.cpp
index bec7c4b7..b03d465f 100644
--- a/kopete/protocols/irc/ircusercontact.cpp
+++ b/kopete/protocols/irc/ircusercontact.cpp
@@ -53,39 +53,39 @@ IRCUserContact::IRCUserContact(IRCContactManager *contactManager, const TQString
mInfo.away = false;
mInfo.online = metaContact()->isTemporary();
- updatetqStatus();
+ updateStatus();
}
-void IRCUserContact::updatetqStatus()
+void IRCUserContact::updateStatus()
{
//kdDebug(14120) << k_funcinfo << endl;
- Kopete::OnlineStatus newtqStatus;
+ Kopete::OnlineStatus newStatus;
switch (kircEngine()->status())
{
case KIRC::Engine::Idle:
- newtqStatus = m_protocol->m_UserStatusOffline;
+ newStatus = m_protocol->m_UserStatusOffline;
break;
case KIRC::Engine::Connecting:
case KIRC::Engine::Authentifying:
if (this == ircAccount()->mySelf())
- newtqStatus = m_protocol->m_UserStatusConnecting;
+ newStatus = m_protocol->m_UserStatusConnecting;
else
- newtqStatus = m_protocol->m_UserStatusOffline;
+ newStatus = m_protocol->m_UserStatusOffline;
break;
case KIRC::Engine::Connected:
case KIRC::Engine::Closing:
if (mInfo.away)
- newtqStatus = m_protocol->m_UserStatusAway;
+ newStatus = m_protocol->m_UserStatusAway;
else if (mInfo.online)
- newtqStatus = m_protocol->m_UserStatusOnline;
+ newStatus = m_protocol->m_UserStatusOnline;
break;
default:
- newtqStatus = m_protocol->m_StatusUnknown;
+ newStatus = m_protocol->m_StatusUnknown;
}
// Try hard not to emit several onlineStatusChanged() signals.
@@ -105,31 +105,31 @@ void IRCUserContact::updatetqStatus()
for( TQValueList<IRCChannelContact*>::iterator it = channels.begin(); it != channels.end(); ++it )
{
IRCChannelContact *channel = *it;
- Kopete::OnlineStatus currenttqStatus = channel->manager()->contactOnlineStatus(this);
+ Kopete::OnlineStatus currentStatus = channel->manager()->contactOnlineStatus(this);
- //kdDebug(14120) << k_funcinfo << "iterating channel " << channel->nickName() << " internal status: " << currenttqStatus.internalStatus() << endl;
+ //kdDebug(14120) << k_funcinfo << "iterating channel " << channel->nickName() << " internal status: " << currentStatus.internalStatus() << endl;
- if( currenttqStatus.internalStatus() >= IRCProtocol::Online )
+ if( currentStatus.internalStatus() >= IRCProtocol::Online )
{
onlineStatusChanged = true;
- if( !(currenttqStatus.internalStatus() & IRCProtocol::Away) && newtqStatus == m_protocol->m_UserStatusAway )
+ if( !(currentStatus.internalStatus() & IRCProtocol::Away) && newStatus == m_protocol->m_UserStatusAway )
{
- setOnlineStatus( newtqStatus );
+ setOnlineStatus( newStatus );
//kdDebug(14120) << k_funcinfo << "was NOT away, but is now, channel " << channel->nickName() << endl;
adjustInternalOnlineStatusBits(channel, IRCProtocol::Away, AddBits);
}
- else if( (currenttqStatus.internalStatus() & IRCProtocol::Away) && newtqStatus == m_protocol->m_UserStatusOnline )
+ else if( (currentStatus.internalStatus() & IRCProtocol::Away) && newStatus == m_protocol->m_UserStatusOnline )
{
- setOnlineStatus( newtqStatus );
+ setOnlineStatus( newStatus );
//kdDebug(14120) << k_funcinfo << "was away, but not anymore, channel " << channel->nickName() << endl;
adjustInternalOnlineStatusBits(channel, IRCProtocol::Away, RemoveBits);
}
- else if( newtqStatus.internalStatus() < IRCProtocol::Away )
+ else if( newStatus.internalStatus() < IRCProtocol::Away )
{
//kdDebug(14120) << k_funcinfo << "offline or connecting?" << endl;
- channel->manager()->setContactOnlineStatus( this, newtqStatus );
+ channel->manager()->setContactOnlineStatus( this, newStatus );
}
}
}
@@ -137,7 +137,7 @@ void IRCUserContact::updatetqStatus()
if (!onlineStatusChanged) {
//kdDebug(14120) << k_funcinfo << "setting status at last" << endl;
- setOnlineStatus( newtqStatus );
+ setOnlineStatus( newStatus );
}
}
@@ -162,10 +162,10 @@ void IRCUserContact::slotUserOffline()
mInfo.online = false;
mInfo.away = false;
- updatetqStatus();
+ updateStatus();
if( !metaContact()->isTemporary() )
- kircEngine()->writeMessage( TQString::tqfromLatin1("WHOWAS %1").tqarg(m_nickName) );
+ kircEngine()->writeMessage( TQString::fromLatin1("WHOWAS %1").tqarg(m_nickName) );
removeProperty( m_protocol->propUserInfo );
removeProperty( m_protocol->propServer );
@@ -177,7 +177,7 @@ void IRCUserContact::setAway(bool isAway)
//kdDebug(14120) << k_funcinfo << isAway << endl;
mInfo.away = isAway;
- updatetqStatus();
+ updateStatus();
}
void IRCUserContact::incomingUserIsAway(const TQString &reason)
@@ -194,7 +194,7 @@ void IRCUserContact::incomingUserIsAway(const TQString &reason)
void IRCUserContact::userOnline()
{
mInfo.online = true;
- updatetqStatus();
+ updateStatus();
if (this != ircAccount()->mySelf() && !metaContact()->isTemporary() && ircAccount()->isConnected())
{
mOnlineTimer->start( 45000, true );
@@ -221,22 +221,22 @@ const TQString IRCUserContact::caption() const
void IRCUserContact::slotOp()
{
- contactMode( TQString::tqfromLatin1("+o") );
+ contactMode( TQString::fromLatin1("+o") );
}
void IRCUserContact::slotDeop()
{
- contactMode( TQString::tqfromLatin1("-o") );
+ contactMode( TQString::fromLatin1("-o") );
}
void IRCUserContact::slotVoice()
{
- contactMode( TQString::tqfromLatin1("+v") );
+ contactMode( TQString::fromLatin1("+v") );
}
void IRCUserContact::slotDevoice()
{
- contactMode( TQString::tqfromLatin1("-v") );
+ contactMode( TQString::fromLatin1("-v") );
}
void IRCUserContact::slotBanHost()
@@ -260,7 +260,7 @@ void IRCUserContact::slotBanHostOnce()
Kopete::ContactPtrList members = mActiveManager->members();
TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->mode(channelName, TQString::tqfromLatin1("+b *!*@%1").tqarg(mInfo.hostName));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*@%1").tqarg(mInfo.hostName));
}
void IRCUserContact::slotBanUserHost()
@@ -284,7 +284,7 @@ void IRCUserContact::slotBanUserHostOnce()
Kopete::ContactPtrList members = mActiveManager->members();
TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->mode(channelName, TQString::tqfromLatin1("+b *!*%1@%2").tqarg(mInfo.userName, mInfo.hostName));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*%1@%2").tqarg(mInfo.userName, mInfo.hostName));
}
void IRCUserContact::slotBanDomain()
@@ -310,7 +310,7 @@ void IRCUserContact::slotBanDomainOnce()
TQString domain = mInfo.hostName.section('.', 1);
- kircEngine()->mode(channelName, TQString::tqfromLatin1("+b *!*@*.%1").tqarg(domain));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*@*.%1").tqarg(domain));
}
void IRCUserContact::slotBanUserDomain()
@@ -336,7 +336,7 @@ void IRCUserContact::slotBanUserDomainOnce()
TQString domain = mInfo.hostName.section('.', 1);
- kircEngine()->mode(channelName, TQString::tqfromLatin1("+b *!*%1@*.%2").tqarg(mInfo.userName, domain));
+ kircEngine()->mode(channelName, TQString::fromLatin1("+b *!*%1@*.%2").tqarg(mInfo.userName, domain));
}
void IRCUserContact::slotKick()
@@ -350,7 +350,7 @@ void IRCUserContact::contactMode(const TQString &mode)
{
Kopete::ContactPtrList members = mActiveManager->members();
TQString channelName = static_cast<IRCContact*>(members.first())->nickName();
- kircEngine()->mode(channelName, TQString::tqfromLatin1("%1 %2").tqarg(mode).tqarg(m_nickName));
+ kircEngine()->mode(channelName, TQString::fromLatin1("%1 %2").tqarg(mode).tqarg(m_nickName));
}
void IRCUserContact::slotCtcpPing()
@@ -370,9 +370,9 @@ void IRCUserContact::newWhoIsUser(const TQString &username, const TQString &host
mInfo.hostName = hostname;
mInfo.realName = realname;
- if( onlinetqStatus().status() == Kopete::OnlineStatus::Offline )
+ if( onlineStatus().status() == Kopete::OnlineStatus::Offline )
{
- setProperty( m_protocol->propUserInfo, TQString::tqfromLatin1("%1@%2")
+ setProperty( m_protocol->propUserInfo, TQString::fromLatin1("%1@%2")
.tqarg(mInfo.userName).tqarg(mInfo.hostName) );
setProperty( m_protocol->propServer, mInfo.serverName );
setProperty( m_protocol->propFullName, mInfo.realName );
@@ -382,8 +382,8 @@ void IRCUserContact::newWhoIsUser(const TQString &username, const TQString &host
void IRCUserContact::newWhoIsServer(const TQString &servername, const TQString &serverinfo)
{
mInfo.serverName = servername;
- if( metaContact()->isTemporary() || onlinetqStatus().status() == Kopete::OnlineStatus::Online
- || onlinetqStatus().status() == Kopete::OnlineStatus::Away )
+ if( metaContact()->isTemporary() || onlineStatus().status() == Kopete::OnlineStatus::Online
+ || onlineStatus().status() == Kopete::OnlineStatus::Away )
mInfo.serverInfo = serverinfo;
else
{
@@ -489,7 +489,7 @@ TQString IRCUserContact::formattedName() const
void IRCUserContact::updateInfo()
{
- setProperty( m_protocol->propUserInfo, TQString::tqfromLatin1("%1@%2")
+ setProperty( m_protocol->propUserInfo, TQString::fromLatin1("%1@%2")
.tqarg(mInfo.userName).tqarg(mInfo.hostName) );
setProperty( m_protocol->propServer, mInfo.serverName );
setProperty( m_protocol->propChannels, mInfo.channels.join(" ") );
@@ -667,32 +667,32 @@ void IRCUserContact::slotIncomingModeChange( const TQString &channel, const TQSt
void IRCUserContact::adjustInternalOnlineStatusBits(IRCChannelContact *channel, unsigned statusAdjustment, bitAdjustment adj)
{
- Kopete::OnlineStatus currenttqStatus = channel->manager()->contactOnlineStatus(this);
- Kopete::OnlineStatus newtqStatus;
+ Kopete::OnlineStatus currentStatus = channel->manager()->contactOnlineStatus(this);
+ Kopete::OnlineStatus newStatus;
if (adj == RemoveBits) {
// If the bit is not set in the current internal status, stop here.
- if ((currenttqStatus.internalStatus() & ~statusAdjustment) == currenttqStatus.internalStatus())
+ if ((currentStatus.internalStatus() & ~statusAdjustment) == currentStatus.internalStatus())
return;
- newtqStatus = m_protocol->statusLookup(
- (IRCProtocol::IRCtqStatus)(currenttqStatus.internalStatus() & ~statusAdjustment)
+ newStatus = m_protocol->statusLookup(
+ (IRCProtocol::IRCStatus)(currentStatus.internalStatus() & ~statusAdjustment)
);
} else if (adj == AddBits) {
// If the bit is already set in the current internal status, stop here.
- if ((currenttqStatus.internalStatus() | statusAdjustment) == currenttqStatus.internalStatus())
+ if ((currentStatus.internalStatus() | statusAdjustment) == currentStatus.internalStatus())
return;
- newtqStatus = m_protocol->statusLookup(
- (IRCProtocol::IRCtqStatus)(currenttqStatus.internalStatus() | statusAdjustment)
+ newStatus = m_protocol->statusLookup(
+ (IRCProtocol::IRCStatus)(currentStatus.internalStatus() | statusAdjustment)
);
}
- channel->manager()->setContactOnlineStatus(this, newtqStatus);
+ channel->manager()->setContactOnlineStatus(this, newStatus);
}
void IRCUserContact::privateMessage(IRCContact *from, IRCContact *to, const TQString &message)