X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.h;h=359d032e4a86837cce34beebf16af48942cc415a;hp=c4bea908e85ed5c3bec2ac289e56abe867333106;hb=8832d69af719e187e398fa6cc86665c2cb9c211c;hpb=0d0a9199ac670b0427704d53e431d29f5beaf2d5 diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index c4bea908..359d032e 100644 --- a/src/core/corenetwork.h +++ b/src/core/corenetwork.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 by the Quassel Project * + * Copyright (C) 2005-2015 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -40,6 +40,8 @@ #include "coresession.h" +#include + class CoreIdentity; class CoreUserInputHandler; class CoreIgnoreListManager; @@ -82,6 +84,9 @@ public: inline QString channelKey(const QString &channel) const { return _channelKeys.value(channel.toLower(), QString()); } + inline QByteArray readChannelCipherKey(const QString &channel) const { return _cipherKeys.value(channel.toLower()); } + inline void storeChannelCipherKey(const QString &channel, const QByteArray &key) { _cipherKeys[channel.toLower()] = key; } + inline bool isAutoWhoInProgress(const QString &channel) const { return _autoWhoPending.value(channel.toLower(), 0); } inline UserId userId() const { return _coreSession->user(); } @@ -93,6 +98,8 @@ public: inline quint16 localPort() const { return socket.localPort(); } inline quint16 peerPort() const { return socket.peerPort(); } + QList> splitMessage(const QString &cmd, const QString &message, std::function(QString &)> cmdGenerator); + public slots: virtual void setMyNick(const QString &mynick); @@ -112,6 +119,7 @@ public slots: void userInput(BufferInfo bufferInfo, QString msg); void putRawLine(QByteArray input); void putCmd(const QString &cmd, const QList ¶ms, const QByteArray &prefix = QByteArray()); + void putCmd(const QString &cmd, const QList> ¶ms, const QByteArray &prefix = QByteArray()); void setChannelJoined(const QString &channel); void setChannelParted(const QString &channel); @@ -157,7 +165,6 @@ signals: void sslErrors(const QVariant &errorData); void newEvent(Event *event); - void socketOpen(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort); void socketInitialized(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort); void socketDisconnected(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort); @@ -240,6 +247,9 @@ private: QList _msgQueue; QString _requestedUserModes; // 2 strings separated by a '-' character. first part are requested modes to add, the second to remove + + // List of blowfish keys for channels + QHash _cipherKeys; };