diff options
Diffstat (limited to 'kopete/protocols/irc/libkirc/kircengine_commands.cpp')
-rw-r--r-- | kopete/protocols/irc/libkirc/kircengine_commands.cpp | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/kopete/protocols/irc/libkirc/kircengine_commands.cpp b/kopete/protocols/irc/libkirc/kircengine_commands.cpp index 0a0f9002..21a90676 100644 --- a/kopete/protocols/irc/libkirc/kircengine_commands.cpp +++ b/kopete/protocols/irc/libkirc/kircengine_commands.cpp @@ -21,36 +21,36 @@ #include <kextsock.h> -#include <qtimer.h> +#include <tqtimer.h> using namespace KIRC; void Engine::bindCommands() { - bind("ERROR", this, SLOT(error(KIRC::Message &)), 0, 0); - bind("JOIN", this, SLOT(join(KIRC::Message &)), 0, 1); - bind("KICK", this, SLOT(kick(KIRC::Message &)), 2, 2); - bind("NICK", this, SLOT(nick(KIRC::Message &)), 0, 0); - bind("MODE", this, SLOT(mode(KIRC::Message &)), 1, 1); - bind("NOTICE", this, SLOT(notice(KIRC::Message &)), 1, 1); - bind("PART", this, SLOT(part(KIRC::Message &)), 1, 1); - bind("PING", this, SLOT(ping(KIRC::Message &)), 0, 0); - bind("PONG", this, SLOT(pong(KIRC::Message &)), 0, 0); - bind("PRIVMSG", this, SLOT(privmsg(KIRC::Message &)), 1, 1); - bind("QUIT", this, SLOT(quit(KIRC::Message &)), 0, 0); -// bind("SQUIT", this, SLOT(squit(KIRC::Message &)), 1, 1); - bind("TOPIC", this, SLOT(topic(KIRC::Message &)), 1, 1); + bind("ERROR", this, TQT_SLOT(error(KIRC::Message &)), 0, 0); + bind("JOIN", this, TQT_SLOT(join(KIRC::Message &)), 0, 1); + bind("KICK", this, TQT_SLOT(kick(KIRC::Message &)), 2, 2); + bind("NICK", this, TQT_SLOT(nick(KIRC::Message &)), 0, 0); + bind("MODE", this, TQT_SLOT(mode(KIRC::Message &)), 1, 1); + bind("NOTICE", this, TQT_SLOT(notice(KIRC::Message &)), 1, 1); + bind("PART", this, TQT_SLOT(part(KIRC::Message &)), 1, 1); + bind("PING", this, TQT_SLOT(ping(KIRC::Message &)), 0, 0); + bind("PONG", this, TQT_SLOT(pong(KIRC::Message &)), 0, 0); + bind("PRIVMSG", this, TQT_SLOT(privmsg(KIRC::Message &)), 1, 1); + bind("QUIT", this, TQT_SLOT(quit(KIRC::Message &)), 0, 0); +// bind("SQUIT", this, TQT_SLOT(squit(KIRC::Message &)), 1, 1); + bind("TOPIC", this, TQT_SLOT(topic(KIRC::Message &)), 1, 1); } -void Engine::away(bool isAway, const QString &awayMessage) +void Engine::away(bool isAway, const TQString &awayMessage) { if(isAway) if( !awayMessage.isEmpty() ) - writeMessage("AWAY", QString::null, awayMessage); + writeMessage("AWAY", TQString::null, awayMessage); else - writeMessage("AWAY", QString::null, QString::fromLatin1("I'm away.")); + writeMessage("AWAY", TQString::null, TQString::fromLatin1("I'm away.")); else - writeMessage("AWAY", QString::null); + writeMessage("AWAY", TQString::null); } // FIXME: Really handle this message @@ -59,28 +59,28 @@ void Engine::error(Message &) setStatus(Closing); } -void Engine::ison(const QStringList &nickList) +void Engine::ison(const TQStringList &nickList) { if (!nickList.isEmpty()) { - QString statement = QString::fromLatin1("ISON"); - for (QStringList::ConstIterator it = nickList.begin(); it != nickList.end(); ++it) + TQString statement = TQString::fromLatin1("ISON"); + for (TQStringList::ConstIterator it = nickList.begin(); it != nickList.end(); ++it) { if ((statement.length()+(*it).length())>509) // 512(max buf)-2("\r\n")-1(<space separator>) { writeMessage(statement); - statement = QString::fromLatin1("ISON ") + (*it); + statement = TQString::fromLatin1("ISON ") + (*it); } else - statement.append(QChar(' ') + (*it)); + statement.append(TQChar(' ') + (*it)); } writeMessage(statement); } } -void Engine::join(const QString &name, const QString &key) +void Engine::join(const TQString &name, const TQString &key) { - QStringList args(name); + TQStringList args(name); if ( !key.isNull() ) args << key; @@ -101,9 +101,9 @@ void Engine::join(Message &msg) emit incomingJoinedChannel(Kopete::Message::unescape(msg.suffix()), msg.nickFromPrefix()); } -void Engine::kick(const QString &user, const QString &channel, const QString &reason) +void Engine::kick(const TQString &user, const TQString &channel, const TQString &reason) { - writeMessage("KICK", QStringList(channel) << user << reason); + writeMessage("KICK", TQStringList(channel) << user << reason); } void Engine::kick(Message &msg) @@ -114,9 +114,9 @@ void Engine::kick(Message &msg) emit incomingKick( Kopete::Message::unescape(msg.arg(0)), msg.nickFromPrefix(), msg.arg(1), msg.suffix()); } -void Engine::mode(const QString &target, const QString &mode) +void Engine::mode(const TQString &target, const TQString &mode) { - writeMessage("MODE", QStringList(target) << mode); + writeMessage("MODE", TQStringList(target) << mode); } void Engine::mode(Message &msg) @@ -124,7 +124,7 @@ void Engine::mode(Message &msg) /* Change the mode of a user. * "<nickname> *( ( "+" / "-" ) *( "i" / "w" / "o" / "O" / "r" ) )" */ - QStringList args = msg.args(); + TQStringList args = msg.args(); args.pop_front(); if( Entity::isChannel( msg.arg(0) ) ) emit incomingChannelModeChange( msg.arg(0), msg.nickFromPrefix(), args.join(" ")); @@ -132,7 +132,7 @@ void Engine::mode(Message &msg) emit incomingUserModeChange( msg.nickFromPrefix(), args.join(" ")); } -void Engine::nick(const QString &newNickname) +void Engine::nick(const TQString &newNickname) { m_PendingNick = newNickname; writeMessage("NICK", newNickname); @@ -142,12 +142,12 @@ void Engine::nick(Message &msg) { /* Nick name of a user changed * "<nickname>" */ - QString oldNick = msg.prefix().section('!', 0, 0); - QString newNick = msg.suffix(); + TQString oldNick = msg.prefix().section('!', 0, 0); + TQString newNick = msg.suffix(); if( codecs[ oldNick ] ) { - QTextCodec *c = codecs[ oldNick ]; + TQTextCodec *c = codecs[ oldNick ]; codecs.remove( oldNick ); codecs.insert( newNick, c ); } @@ -161,7 +161,7 @@ void Engine::nick(Message &msg) emit incomingNickChange(oldNick, msg.suffix()); } -void Engine::part(const QString &channel, const QString &reason) +void Engine::part(const TQString &channel, const TQString &reason) { /* This will part a channel with 'reason' as the reason for parting */ @@ -177,7 +177,7 @@ void Engine::part(Message &msg) emit incomingPartedChannel(msg.arg(0), msg.nickFromPrefix(), msg.suffix()); } -void Engine::pass(const QString &password) +void Engine::pass(const TQString &password) { writeMessage("PASS", password); } @@ -191,7 +191,7 @@ void Engine::pong(Message &/*msg*/) { } -void Engine::quit(const QString &reason, bool /*now*/) +void Engine::quit(const TQString &reason, bool /*now*/) { kdDebug(14120) << k_funcinfo << reason << endl; @@ -199,7 +199,7 @@ void Engine::quit(const QString &reason, bool /*now*/) return; if (isConnected()) - writeMessage("QUIT", QString::null, reason); + writeMessage("QUIT", TQString::null, reason); setStatus(Closing); } @@ -212,7 +212,7 @@ void Engine::quit(Message &msg) emit incomingQuitIRC(msg.prefix(), msg.suffix()); } -void Engine::user(const QString &newUserName, const QString &hostname, const QString &newRealName) +void Engine::user(const TQString &newUserName, const TQString &hostname, const TQString &newRealName) { /* RFC1459: "<username> <hostname> <servername> <realname>" * The USER command is used at the beginning of connection to specify @@ -221,10 +221,10 @@ void Engine::user(const QString &newUserName, const QString &hostname, const QSt m_Username = newUserName; m_realName = newRealName; - writeMessage("USER", QStringList(m_Username) << hostname << m_Host, m_realName); + writeMessage("USER", TQStringList(m_Username) << hostname << m_Host, m_realName); } -void Engine::user(const QString &newUserName, Q_UINT8 mode, const QString &newRealName) +void Engine::user(const TQString &newUserName, Q_UINT8 mode, const TQString &newRealName) { /* RFC2812: "<user> <mode> <unused> <realname>" * mode is a numeric value (from a bit mask). @@ -234,10 +234,10 @@ void Engine::user(const QString &newUserName, Q_UINT8 mode, const QString &newRe m_Username = newUserName; m_realName = newRealName; - writeMessage("USER", QStringList(m_Username) << QString::number(mode) << QChar('*'), m_realName); + writeMessage("USER", TQStringList(m_Username) << TQString::number(mode) << TQChar('*'), m_realName); } -void Engine::topic(const QString &channel, const QString &topic) +void Engine::topic(const TQString &channel, const TQString &topic) { writeMessage("TOPIC", channel, topic); } @@ -252,15 +252,15 @@ void Engine::topic(Message &msg) void Engine::list() { - writeMessage("LIST", QString::null); + writeMessage("LIST", TQString::null); } -void Engine::motd(const QString &server) +void Engine::motd(const TQString &server) { writeMessage("MOTD", server); } -void Engine::privmsg(const QString &contact, const QString &message) +void Engine::privmsg(const TQString &contact, const TQString &message) { writeMessage("PRIVMSG", contact, message, codecForNick( contact ) ); } @@ -272,9 +272,9 @@ void Engine::privmsg(Message &msg) Message m = msg; if (!m.suffix().isEmpty()) { - QString user = m.arg(0); - QString message = m.suffix(); - const QTextCodec *codec = codecForNick( user ); + TQString user = m.arg(0); + TQString message = m.suffix(); + const TQTextCodec *codec = codecForNick( user ); if (codec != defaultCodec) { m.decodeAgain( codec ); message = m.suffix(); @@ -292,7 +292,7 @@ void Engine::privmsg(Message &msg) } } -void Engine::notice(const QString &target, const QString &message) +void Engine::notice(const TQString &target, const TQString &message) { writeMessage("NOTICE", target, message); } @@ -306,7 +306,7 @@ void Engine::notice(Message &msg) invokeCtcpCommandOfMessage(m_ctcpReplies, msg); } -void Engine::whois(const QString &user) +void Engine::whois(const TQString &user) { writeMessage("WHOIS", user); } |