23 #include "irc/ircglobal.h" 24 #include "irc/ircmessageclass.h" 25 #include "irc/ircuserinfo.h" 26 #include "ircprivadapter.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);
46 Q_UNUSED(fullSignature);
53 IRCUserInfo recipientUserInfo(recipientName, network());
60 case IRCChatAdapter::NetworkKill:
61 message = tr(
"This user connection has been killed. (KILL: %1)").arg(farewellMessage);
64 case IRCChatAdapter::NetworkQuit:
65 message = tr(
"This user has left the network. (QUIT: %1)").arg(farewellMessage);
69 emit error(tr(
"Unhandled IRCQuitType in IRCPrivAdapter::userLeaves()"));
73 if (!message.isEmpty())
74 emit messageWithClass(message, IRCMessageClass::NetworkAction);
Interprets communication between the client and the IRC server.
void userChangesNickname(const QString &oldNickname, const QString &newNickname) override
Use this to register the fact that user has changed his/hers nickname.
Handles chatting through IRC.
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.
void userJoins(const QString &nickname, const QString &fullSignature) override
Use this to register the fact that user has joined the chat.
void userLeaves(const QString &nickname, const QString &farewellMessage, IRCQuitType quitType) override
Use this to register the fact that user has left the chat.