diff options
Diffstat (limited to 'kopete/protocols/irc/libkirc/kircengine_ctcp.cpp')
-rw-r--r-- | kopete/protocols/irc/libkirc/kircengine_ctcp.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp b/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp index 7216dea7..83a4257c 100644 --- a/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp +++ b/kopete/protocols/irc/libkirc/kircengine_ctcp.cpp @@ -72,7 +72,7 @@ void Engine::CtcpRequestCommand(const TQString &contact, const TQString &command { if(m_status == Connected) { - writeCtcpQueryMessage(contact, TQString::null, command); + writeCtcpQueryMessage(contact, TQString(), command); // emit ctcpCommandMessage( contact, command ); } } @@ -81,7 +81,7 @@ void Engine::CtcpRequest_action(const TQString &contact, const TQString &message { if(m_status == Connected) { - writeCtcpQueryMessage(contact, TQString::null, "ACTION", message); + writeCtcpQueryMessage(contact, TQString(), "ACTION", message); if( Entity::isChannel(contact) ) emit incomingAction(Kopete::Message::unescape(contact), Kopete::Message::unescape(m_Nickname), message); @@ -109,15 +109,15 @@ bool Engine::CtcpReply_action(Message &msg) // FIXME: the API can now answer to help commands. void Engine::CtcpQuery_clientinfo(Message &msg) { - TQString clientinfo = customCtcpMap[ TQString::fromLatin1("clientinfo") ]; + TQString clientinfo = customCtcpMap[ TQString::tqfromLatin1("clientinfo") ]; if (clientinfo.isNull()) - clientinfo = TQString::fromLatin1("The following commands are supported, but " + clientinfo = TQString::tqfromLatin1("The following commands are supported, but " "without sub-command help: VERSION, CLIENTINFO, USERINFO, TIME, SOURCE, PING," "ACTION."); - writeCtcpReplyMessage( msg.nickFromPrefix(), TQString::null, - msg.ctcpMessage().command(), TQString::null, clientinfo); + writeCtcpReplyMessage( msg.nickFromPrefix(), TQString(), + msg.ctcpMessage().command(), TQString(), clientinfo); } void Engine::CtcpRequest_dcc(const TQString &nickname, const TQString &fileName, uint port, Transfer::Type type) @@ -131,9 +131,9 @@ void Engine::CtcpRequest_dcc(const TQString &nickname, const TQString &fileName, { case Transfer::Chat: { - writeCtcpQueryMessage(nickname, TQString::null, - TQString::fromLatin1("DCC"), - TQStringList(TQString::fromLatin1("CHAT")) << TQString::fromLatin1("chat") << + writeCtcpQueryMessage(nickname, TQString(), + TQString::tqfromLatin1("DCC"), + TQStringList(TQString::tqfromLatin1("CHAT")) << TQString::tqfromLatin1("chat") << m_sock->localAddress()->nodeName() << TQString::number(port) ); break; @@ -143,8 +143,8 @@ void Engine::CtcpRequest_dcc(const TQString &nickname, const TQString &fileName, { TQFileInfo file(fileName); TQString noWhiteSpace = file.fileName(); - if (noWhiteSpace.contains(' ') > 0) - noWhiteSpace.replace(TQRegExp("\\s+"), "_"); + if (noWhiteSpace.tqcontains(' ') > 0) + noWhiteSpace.tqreplace(TQRegExp("\\s+"), "_"); TransferServer *server = TransferHandler::self()->createServer(this, nickname, type, fileName, file.size()); @@ -153,9 +153,9 @@ void Engine::CtcpRequest_dcc(const TQString &nickname, const TQString &fileName, kdDebug(14120) << "Starting DCC file outgoing transfer." << endl; - writeCtcpQueryMessage(nickname, TQString::null, - TQString::fromLatin1("DCC"), - TQStringList(TQString::fromLatin1("SEND")) << noWhiteSpace << ipNumber << + writeCtcpQueryMessage(nickname, TQString(), + TQString::tqfromLatin1("DCC"), + TQStringList(TQString::tqfromLatin1("SEND")) << noWhiteSpace << ipNumber << TQString::number(server->port()) << TQString::number(file.size()) ); break; @@ -173,7 +173,7 @@ void Engine::CtcpQuery_dcc(Message &msg) Message &ctcpMsg = msg.ctcpMessage(); TQString dccCommand = ctcpMsg.arg(0).upper(); - if (dccCommand == TQString::fromLatin1("CHAT")) + if (dccCommand == TQString::tqfromLatin1("CHAT")) { // if(ctcpMsg.argsSize()!=4) return false; @@ -196,7 +196,7 @@ void Engine::CtcpQuery_dcc(Message &msg) Transfer::Chat ); } } - else if (dccCommand == TQString::fromLatin1("SEND")) + else if (dccCommand == TQString::tqfromLatin1("SEND")) { // if(ctcpMsg.argsSize()!=5) return false; @@ -253,11 +253,11 @@ void Engine::CtcpRequest_ping(const TQString &target) TQString timeReply; if( Entity::isChannel(target) ) - timeReply = TQString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec); + timeReply = TQString::tqfromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec); else timeReply = TQString::number( time.tv_sec ); - writeCtcpQueryMessage( target, TQString::null, "PING", timeReply); + writeCtcpQueryMessage( target, TQString(), "PING", timeReply); } // else // ((MessageRedirector *)sender())->error("failed to get current time"); @@ -265,7 +265,7 @@ void Engine::CtcpRequest_ping(const TQString &target) void Engine::CtcpQuery_ping(Message &msg) { - writeCtcpReplyMessage( msg.nickFromPrefix(), TQString::null, + writeCtcpReplyMessage( msg.nickFromPrefix(), TQString(), msg.ctcpMessage().command(), msg.ctcpMessage().arg(0)); } @@ -275,7 +275,7 @@ void Engine::CtcpReply_ping(Message &msg) if (gettimeofday(&time, 0) == 0) { // FIXME: the time code is wrong for usec - TQString timeReply = TQString::fromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec); + TQString timeReply = TQString::tqfromLatin1("%1.%2").arg(time.tv_sec).arg(time.tv_usec); double newTime = timeReply.toDouble(); double oldTime = msg.suffix().section(' ',0, 0).toDouble(); double difference = newTime - oldTime; @@ -284,7 +284,7 @@ void Engine::CtcpReply_ping(Message &msg) if (difference < 1) { diffString = TQString::number(difference); - diffString.remove((diffString.find('.') -1), 2); + diffString.remove((diffString.tqfind('.') -1), 2); diffString.truncate(3); diffString.append("milliseconds"); } @@ -293,12 +293,12 @@ void Engine::CtcpReply_ping(Message &msg) diffString = TQString::number(difference); TQString seconds = diffString.section('.', 0, 0); TQString millSec = diffString.section('.', 1, 1); - millSec.remove(millSec.find('.'), 1); + millSec.remove(millSec.tqfind('.'), 1); millSec.truncate(3); - diffString = TQString::fromLatin1("%1 seconds, %2 milliseconds").arg(seconds).arg(millSec); + diffString = TQString::tqfromLatin1("%1 seconds, %2 milliseconds").arg(seconds).arg(millSec); } - emit incomingCtcpReply(TQString::fromLatin1("PING"), msg.nickFromPrefix(), diffString); + emit incomingCtcpReply(TQString::tqfromLatin1("PING"), msg.nickFromPrefix(), diffString); } // else // ((MessageRedirector *)sender())->error("failed to get current time"); @@ -306,36 +306,36 @@ void Engine::CtcpReply_ping(Message &msg) void Engine::CtcpQuery_source(Message &msg) { - writeCtcpReplyMessage(msg.nickFromPrefix(), TQString::null, + writeCtcpReplyMessage(msg.nickFromPrefix(), TQString(), msg.ctcpMessage().command(), m_SourceString); } void Engine::CtcpQuery_time(Message &msg) { - writeCtcpReplyMessage(msg.nickFromPrefix(), TQString::null, - msg.ctcpMessage().command(), TQDateTime::currentDateTime().toString(), - TQString::null, false); + writeCtcpReplyMessage(msg.nickFromPrefix(), TQString(), + msg.ctcpMessage().command(), TQDateTime::tqcurrentDateTime().toString(), + TQString(), false); } void Engine::CtcpQuery_userinfo(Message &msg) { - TQString userinfo = customCtcpMap[ TQString::fromLatin1("userinfo") ]; + TQString userinfo = customCtcpMap[ TQString::tqfromLatin1("userinfo") ]; if (userinfo.isNull()) userinfo = m_UserString; - writeCtcpReplyMessage(msg.nickFromPrefix(), TQString::null, - msg.ctcpMessage().command(), TQString::null, userinfo); + writeCtcpReplyMessage(msg.nickFromPrefix(), TQString(), + msg.ctcpMessage().command(), TQString(), userinfo); } void Engine::CtcpRequest_version(const TQString &target) { - writeCtcpQueryMessage(target, TQString::null, "VERSION"); + writeCtcpQueryMessage(target, TQString(), "VERSION"); } void Engine::CtcpQuery_version(Message &msg) { - TQString response = customCtcpMap[ TQString::fromLatin1("version") ]; + TQString response = customCtcpMap[ TQString::tqfromLatin1("version") ]; kdDebug(14120) << "Version check: " << response << endl; if (response.isNull()) |