23 #ifndef __IRCNETWORKADAPTER_H__ 24 #define __IRCNETWORKADAPTER_H__ 26 #include "irc/ircadapterbase.h" 27 #include "irc/ircclient.h" 28 #include "irc/ircnetworkconnectioninfo.h" 29 #include "irc/ircrequestparser.h" 30 #include "socketsignalsadapter.h" 61 return this->
isOperator(this->myNickname(), channel);
84 void banUser(
const QString& nickname,
const QString& reason,
const QString& channel);
86 QList<IRCAdapterBase*> childrenAdapters();
90 return this->connectionInfo;
99 void disconnect(
const QString& farewellMessage);
121 bool hasRecipient(
const QString& recipient)
const;
130 bool isConnected()
const {
return ircClient.isConnected(); }
131 bool isMyNickname(
const QString& nickname)
const;
141 bool isOperator(
const QString& nickname,
const QString& channel)
const;
143 void killAllChatWindows();
145 const QString& myNickname()
const {
return connectionInfo.
nick; }
154 return ircResponseParser;
165 void setChannelMode(
const QString& channel,
const QString& nickname,
const QString& flag,
bool bSet);
167 void sendCtcp(
const QString &nickname,
const QString &command);
174 this->bEmitAllIRCMessages = b;
179 QString
title()
const;
201 void printMsgLiteral(
const QString& recipient,
const QString& content,
206 void print(
const QString& printWhat,
const QString& printWhere);
207 void printWithClass(
const QString& printWhat,
const QString& printWhere,
const IRCMessageClass& msgClass);
208 void printToCurrentChatBox(
const QString& printWhat,
const IRCMessageClass& msgClass);
209 void reloadNetworkEntityFromConfig();
210 void userPing(
const QString &nickname, qint64 ping);
237 bool bEmitAllIRCMessages;
247 QHash<QString, IRCChatAdapter*> chatWindows;
259 const IRCChatAdapter* getChatAdapter(
const QString& recipient)
const;
270 IRCChatAdapter* getOrCreateNewChatAdapter(
const QString& recipient);
272 void killChatWindow(
const QString& recipient);
275 void appendISupportLine(
const QString &line);
276 void echoPrivmsg(
const QString& recipient,
const QString& content);
277 void helloClient(
const QString& nickname);
278 void kick(
const QString& channel,
const QString& byWhom,
const QString& whoIsKicked,
const QString& reason);
279 void kill(
const QString& victim,
const QString& comment);
280 void ircServerResponse(
const QString& message);
281 void modeInfo(
const QString& channel,
const QString& whoSetThis,
const QString& modeParams);
282 void namesListReceived(
const QString& channel,
const QStringList& names);
283 void namesListEndReceived(
const QString& channel);
284 void nicknameInUse(
const QString& nickname);
285 void noSuchNickname(
const QString& nickname);
286 void parseError(
const QString& error);
288 void privMsgReceived(
const QString& recipient,
const QString& sender,
const QString& content);
289 void sendPong(
const QString& toWhom);
290 void userChangesNickname(
const QString& oldNickname,
const QString& newNickname);
291 void userIdleTime(
const QString &nick,
int secondsIdle);
292 void userJoinsChannel(
const QString& channel,
const QString& nickname,
const QString& fullSignature);
293 void userModeChanged(
const QString& channel,
const QString& nickname,
294 const QList<char> &addedFlags,
const QList<char> &removedFlags);
295 void userNetworkJoinDateTime(
const QString &nick,
const QDateTime &timeOfJoin);
296 void userPartsChannel(
const QString& channel,
const QString& nickname,
const QString& farewellMessage);
297 void userQuitsNetwork(
const QString& nickname,
const QString& farewellMessage);
298 void whoIsUser(
const QString& nickname,
const QString& user,
const QString& hostName,
const QString& realName);
311 this->pParent = pParent;
317 void errorReceived(QAbstractSocket::SocketError error);
318 void infoMessage(
const QString& message);
Interprets communication between the client and the IRC server.
Allows to perform operation on a list of users.
Parses request and interprets them in a way that emulates mIRC (or any even slightly sane IRC client ...
void openNewAdapter(const QString &recipientName)
Opens a new chat adapter for specified recipient.
void print(const QString &printWhat, const QString &printWhere)
AdapterType adapterType() const
Gets adapter type for this adapter instance.
QString title() const
Gets title for this adapter.
void banUser(const QString &nickname, const QString &reason, const QString &channel)
Bans specified user from a channel.
Provides an unified communication interface between a client and IRC network entities.
void doSendMessage(const QString &message, IRCAdapterBase *pOrigin)
Implemented to support direct communication between client and server.
void setEmitAllIRCMessagesEnabled(bool b)
QString nick
Original nickname. This variable will always store the current nickname of the client.
Struct containing information about client's connection to the IRC server.
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...
bool isOperator(const QString &nickname, const QString &channel) const
Checks if user is an operator on a given channel.
AdapterType
Defines all possible types of IRC adapters.
bool amIOperator(const QString &channel) const
Checks if client is an operator on a specified channel.
void detachChatWindow(const IRCChatAdapter *pAdapter)
Detaches the specified IRCChatAdapter instance from this network without deleting it...
const IRCUserPrefix & userPrefixes() const
All allowed modes with their nickname prefixes for this network.
void setChannelMode(const QString &channel, const QString &nickname, const QString &flag, bool bSet)
Sets channel flags.
One-to-one association of visible prefixes to user mode.
Data structure that describes and defines a connection to an IRC network or server.
void newChatWindowIsOpened(IRCChatAdapter *pWindow)
Signal emitted when a new chat (priv or channel) is opened from this network.
bool isAdapterRelated(const IRCAdapterBase *pAdapter) const
Checks if pAdapter equals this or is one of chat windows of this network.