diff options
author | louiz’ <louiz@louiz.org> | 2018-08-23 15:21:12 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2018-08-23 22:18:49 +0200 |
commit | 7d0df9b6ddee8db69ea0a511f031f32a4537a749 (patch) | |
tree | 86b1105169b6bf7ea5eea88fac3ec75597231d38 /src/irc | |
parent | 6c431b64d050a13853ebf3715fb6bf7986c0cff1 (diff) | |
download | biboumi-7d0df9b6ddee8db69ea0a511f031f32a4537a749.tar.gz biboumi-7d0df9b6ddee8db69ea0a511f031f32a4537a749.tar.bz2 biboumi-7d0df9b6ddee8db69ea0a511f031f32a4537a749.tar.xz biboumi-7d0df9b6ddee8db69ea0a511f031f32a4537a749.zip |
Disable the throttle limit if negative
Also, invalid values result in -1 being set
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/irc_client.cpp | 2 | ||||
-rw-r--r-- | src/irc/irc_client.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp index 78d0fbf..2835a33 100644 --- a/src/irc/irc_client.cpp +++ b/src/irc/irc_client.cpp @@ -1291,7 +1291,7 @@ bool IrcClient::abort_on_invalid_cert() const } #endif -std::size_t IrcClient::get_throttle_limit() const +long int IrcClient::get_throttle_limit() const { #ifdef USE_DATABASE return Database::get_irc_server_options(this->bridge.get_bare_jid(), this->hostname).col<Database::ThrottleLimit>(); diff --git a/src/irc/irc_client.hpp b/src/irc/irc_client.hpp index aa314f8..1653225 100644 --- a/src/irc/irc_client.hpp +++ b/src/irc/irc_client.hpp @@ -402,7 +402,7 @@ private: */ Resolver dns_resolver; TokensBucket tokens_bucket; - std::size_t get_throttle_limit() const; + long int get_throttle_limit() const; }; |