X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.h;h=4d4e673afd120d8651c5e4c149fb18b0b78d7ba8;hb=78decd5f8d1a149fc0e62e01bd6b2886e0feadfe;hp=8201b43757a692537c30f720f4bc31f14aa4750f;hpb=d017fec4290f7585427f78371e7851487b9dc2eb;p=quassel.git diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index 8201b437..4d4e673a 100644 --- a/src/core/corenetwork.h +++ b/src/core/corenetwork.h @@ -101,6 +101,15 @@ public: inline quint16 localPort() const { return socket.localPort(); } inline quint16 peerPort() const { return socket.peerPort(); } + /** + * Gets whether or not a disconnect was expected. + * + * Distinguishes desired quits from unexpected disconnections such as socket errors or timeouts. + * + * @return True if disconnect was requested, otherwise false. + */ + inline bool disconnectExpected() const { return _disconnectExpected; } + QList> splitMessage(const QString &cmd, const QString &message, std::function(QString &)> cmdGenerator); // IRCv3 capability negotiation