X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.h;h=f121986a042e3361fa6702c91f42a7e5d4cea65b;hp=669b667521d26a919382082e17161f4813c34e86;hb=ff2aeb5dad907f833b4311243213e5ee9fe12dfc;hpb=45a0d954542db252ceb62b61243ee5c2253383de diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index 669b6675..f121986a 100644 --- a/src/core/corenetwork.h +++ b/src/core/corenetwork.h @@ -156,7 +156,18 @@ public slots: void setPingInterval(int interval); void connectToIrc(bool reconnecting = false); - void disconnectFromIrc(bool requested = true, const QString &reason = QString(), bool withReconnect = false); + /** + * Disconnect from the IRC server. + * + * Begin disconnecting from the IRC server, including optionally reconnecting. + * + * @param requested If true, user requested this disconnect; don't try to reconnect + * @param reason Reason for quitting, defaulting to the user-configured quit reason + * @param withReconnect Reconnect to the network after disconnecting (e.g. ping timeout) + * @param forceImmediate Immediately disconnect from network, skipping queue of other commands + */ + void disconnectFromIrc(bool requested = true, const QString &reason = QString(), + bool withReconnect = false, bool forceImmediate = false); void userInput(BufferInfo bufferInfo, QString msg); @@ -361,6 +372,10 @@ private: bool _quitRequested; QString _quitReason; + bool _disconnectExpected; /// If true, connection is quitting, expect a socket close + // This avoids logging a spurious RemoteHostClosedError whenever disconnect is called without + // specifying a permanent (saved to core session) disconnect. + bool _previousConnectionAttemptFailed; int _lastUsedServerIndex;