X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fctcpparser.h;h=5808a71280022f6dc65b5631e7b7ad74088114d8;hp=07a909548af1beed0e92b280418f541af19c319a;hb=39328183a6a87c6eb10a9dbbffcd5d65bf154a1f;hpb=694f9bfbf7f1af19108461c7e00d133e55082bce diff --git a/src/core/ctcpparser.h b/src/core/ctcpparser.h index 07a90954..5808a712 100644 --- a/src/core/ctcpparser.h +++ b/src/core/ctcpparser.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef CTCPPARSER_H @@ -26,6 +26,7 @@ #include "corenetwork.h" #include "eventmanager.h" #include "ircevent.h" +#include "ctcpevent.h" class CoreSession; class CtcpEvent; @@ -35,7 +36,7 @@ class CtcpParser : public QObject Q_OBJECT public: - CtcpParser(CoreSession *coreSession, QObject *parent = 0); + CtcpParser(CoreSession *coreSession, QObject *parent = nullptr); inline CoreSession *coreSession() const { return _coreSession; } @@ -63,6 +64,8 @@ protected: Message::Flags msgFlags = Message::None); void parse(IrcEventRawMessage *event, Message::Type msgType); + void parseSimple(IrcEventRawMessage *e, Message::Type messagetype, QByteArray dequotedMessage, CtcpEvent::CtcpType ctcptype, Message::Flags flags); + void parseStandard(IrcEventRawMessage *e, Message::Type messagetype, QByteArray dequotedMessage, CtcpEvent::CtcpType ctcptype, Message::Flags flags); QByteArray lowLevelQuote(const QByteArray &); QByteArray lowLevelDequote(const QByteArray &); @@ -72,6 +75,9 @@ protected: QByteArray pack(const QByteArray &ctcpTag, const QByteArray &message); void packedReply(CoreNetwork *network, const QString &bufname, const QList &replies); +private slots: + void setStandardCtcp(bool enabled); + private: inline QString targetDecode(IrcEventRawMessage *e, const QByteArray &msg) { return coreNetwork(e)->userDecode(e->target(), msg); } @@ -82,7 +88,7 @@ private: QString bufferName; QList replies; - CtcpReply() : network(0) {} + CtcpReply() : network(nullptr) {} CtcpReply(CoreNetwork *net, const QString &buf) : network(net), bufferName(buf) {} };