X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.h;h=4d4e673afd120d8651c5e4c149fb18b0b78d7ba8;hb=56b2bf3a1a742971a5de7ced1b57024424fc78b8;hp=8201b43757a692537c30f720f4bc31f14aa4750f;hpb=af3b5761f118a0be37f9713e529efd874bf8e11e;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