23 #include "ircprivadapter.h"
24 #include "irc/ircmessageclass.h"
25 #include "irc/ircglobal.h"
26 #include "irc/ircuserinfo.h"
28 IRCPrivAdapter::IRCPrivAdapter(
IRCNetworkAdapter* pNetwork,
const QString& recipient)
35 if (recipientName.compare(oldNickname, Qt::CaseInsensitive) == 0)
37 emit messageWithClass(tr(
"This user changed nickname from %1 to %2")
38 .arg(oldNickname, newNickname), IRCMessageClass::ChannelAction);
39 setRecipient(newNickname);
58 case IRCChatAdapter::NetworkKill:
59 message = tr(
"This user connection has been killed. (KILL: %1)").arg(farewellMessage);
62 case IRCChatAdapter::NetworkQuit:
63 message = tr(
"This user has left the network. (QUIT: %1)").arg(farewellMessage);
67 emit error(tr(
"Unhandled IRCQuitType in IRCPrivAdapter::userLeaves()"));
71 if (!message.isEmpty())
73 emit messageWithClass(message, IRCMessageClass::NetworkAction);
Interprets communication between the client and the IRC server.
void userChangesNickname(const QString &oldNickname, const QString &newNickname)
Use this to register the fact that user has changed his/hers nickname.
Handles chatting through IRC.
IRCNetworkAdapter * network()
The idea of the adapter system is that each adapter is either a network or is a child of a network...
void userJoins(const QString &nickname, const QString &fullSignature)
Use this to register the fact that user has joined the chat.
void userLeaves(const QString &nickname, const QString &farewellMessage, IRCQuitType quitType)
Use this to register the fact that user has left the chat.
bool isSameNickname(const IRCUserInfo &otherUser) const
Check if this user and user specified as parameter are the same user.
Holds information flags about given nickname.