X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.h;h=b67e2c340f5b35ffada0263d5df7491c3949b6b2;hp=509df19d77671c5b1d45620afcc126122dd7cfe6;hb=68878dc8366f2f4a0afe132847aad9a51a80cdbf;hpb=7d30b18136eecbdf2089e5d5877c7e41c6f4bcb6 diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index 509df19d..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 @@ -284,8 +293,14 @@ public slots: * @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