6 #ifndef __IRCNETWORKADAPTER_H__ 7 #define __IRCNETWORKADAPTER_H__ 9 #include "irc/ircadapterbase.h" 10 #include "irc/ircclient.h" 11 #include "irc/ircnetworkconnectioninfo.h" 12 #include "irc/ircrequestparser.h" 13 #include "socketsignalsadapter.h" 44 return this->
isOperator(this->myNickname(), channel);
67 void banUser(
const QString& nickname,
const QString& reason,
const QString& channel);
69 QList<IRCAdapterBase*> childrenAdapters();
73 return this->connectionInfo;
82 void disconnect(
const QString& farewellMessage);
104 bool hasRecipient(
const QString& recipient)
const;
113 bool isConnected()
const {
return ircClient.isConnected(); }
114 bool isMyNickname(
const QString& nickname)
const;
124 bool isOperator(
const QString& nickname,
const QString& channel)
const;
126 void killAllChatWindows();
128 const QString& myNickname()
const {
return connectionInfo.
nick; }
137 return ircResponseParser;
148 void setChannelMode(
const QString& channel,
const QString& nickname,
const QString& flag,
bool bSet);
150 void sendCtcp(
const QString &nickname,
const QString &command);
157 this->bEmitAllIRCMessages = b;
162 QString
title()
const;
184 void printMsgLiteral(
const QString& recipient,
const QString& content,
189 void print(
const QString& printWhat,
const QString& printWhere);
190 void printWithClass(
const QString& printWhat,
const QString& printWhere,
const IRCMessageClass& msgClass);
191 void printToCurrentChatBox(
const QString& printWhat,
const IRCMessageClass& msgClass);
192 void reloadNetworkEntityFromConfig();
193 void userPing(
const QString &nickname, qint64 ping);
220 bool bEmitAllIRCMessages;
230 QHash<QString, IRCChatAdapter*> chatWindows;
242 const IRCChatAdapter* getChatAdapter(
const QString& recipient)
const;
253 IRCChatAdapter* getOrCreateNewChatAdapter(
const QString& recipient);
255 void killChatWindow(
const QString& recipient);
258 void appendISupportLine(
const QString &line);
259 void echoPrivmsg(
const QString& recipient,
const QString& content);
260 void helloClient(
const QString& nickname);
261 void kick(
const QString& channel,
const QString& byWhom,
const QString& whoIsKicked,
const QString& reason);
262 void kill(
const QString& victim,
const QString& comment);
263 void ircServerResponse(
const QString& message);
264 void modeInfo(
const QString& channel,
const QString& whoSetThis,
const QString& modeParams);
265 void namesListReceived(
const QString& channel,
const QStringList& names);
266 void namesListEndReceived(
const QString& channel);
267 void nicknameInUse(
const QString& nickname);
268 void noSuchNickname(
const QString& nickname);
269 void parseError(
const QString& error);
271 void privMsgReceived(
const QString& recipient,
const QString& sender,
const QString& content);
272 void sendPong(
const QString& toWhom);
273 void userChangesNickname(
const QString& oldNickname,
const QString& newNickname);
274 void userIdleTime(
const QString &nick,
int secondsIdle);
275 void userJoinsChannel(
const QString& channel,
const QString& nickname,
const QString& fullSignature);
276 void userModeChanged(
const QString& channel,
const QString& nickname,
277 const QList<char> &addedFlags,
const QList<char> &removedFlags);
278 void userNetworkJoinDateTime(
const QString &nick,
const QDateTime &timeOfJoin);
279 void userPartsChannel(
const QString& channel,
const QString& nickname,
const QString& farewellMessage);
280 void userQuitsNetwork(
const QString& nickname,
const QString& farewellMessage);
281 void whoIsUser(
const QString& nickname,
const QString& user,
const QString& hostName,
const QString& realName);
294 this->pParent = pParent;
300 void errorReceived(QAbstractSocket::SocketError error);
301 void infoMessage(
const QString& message);
302 void hostLookupError(QHostInfo::HostInfoError errorValue);
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)
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.
QString nick
Original nickname. This variable will always store the current nickname of the client.