X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcore%2Fcorenetwork.h;h=b67e2c340f5b35ffada0263d5df7491c3949b6b2;hb=68878dc8366f2f4a0afe132847aad9a51a80cdbf;hp=8201b43757a692537c30f720f4bc31f14aa4750f;hpb=d017fec4290f7585427f78371e7851487b9dc2eb;p=quassel.git diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index 8201b437..b67e2c34 100644 --- a/src/core/corenetwork.h +++ b/src/core/corenetwork.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 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 * @@ -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