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<QList<QByteArray>> splitMessage(const QString &cmd, const QString &message, std::function<QList<QByteArray>(QString &)> cmdGenerator);
// IRCv3 capability negotiation
* @see Network::messageRateBurstSize()
* @see Network::messageRateDelay()
* @see Network::unlimitedMessageRate()
+ *
+ * @param[in] forceUnlimited
+ * @parmblock
+ * If true, override user settings to disable message rate limiting, otherwise apply rate limits
+ * set by the user. Use with caution and remember to re-enable configured limits when done.
+ * @endparmblock
*/
- void updateRateLimiting();
+ void updateRateLimiting(const bool forceUnlimited = false);
/**
* Resets the token bucket up to the maximum