diff options
author | louiz’ <louiz@louiz.org> | 2018-06-25 22:54:32 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2018-06-25 22:54:32 +0200 |
commit | 09b10cc80146c1ac2a0d5c53c6c8469b934189f2 (patch) | |
tree | 9830f92ddda590e29b7d20d79440b2dfa48cffa2 /src/database | |
parent | ba97c442a8be70da6bacd7ef0461fe95e99fe765 (diff) | |
download | biboumi-09b10cc80146c1ac2a0d5c53c6c8469b934189f2.tar.gz biboumi-09b10cc80146c1ac2a0d5c53c6c8469b934189f2.tar.bz2 biboumi-09b10cc80146c1ac2a0d5c53c6c8469b934189f2.tar.xz biboumi-09b10cc80146c1ac2a0d5c53c6c8469b934189f2.zip |
Throttle all commands sent to IRC servers
fix #3354
Diffstat (limited to 'src/database')
-rw-r--r-- | src/database/database.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/database/database.hpp b/src/database/database.hpp index 3e25b30..5f637bd 100644 --- a/src/database/database.hpp +++ b/src/database/database.hpp @@ -86,13 +86,16 @@ class Database struct Address: Column<std::string> { static constexpr auto name = "address_"; }; + struct ThrottleLimit: Column<std::size_t> { static constexpr auto name = "throttlelimit_"; + ThrottleLimit(): Column<std::size_t>(10) {} }; + using MucLogLineTable = Table<Id, Uuid, Owner, IrcChanName, IrcServerName, Date, Body, Nick>; using MucLogLine = MucLogLineTable::RowType; using GlobalOptionsTable = Table<Id, Owner, MaxHistoryLength, RecordHistory, GlobalPersistent>; using GlobalOptions = GlobalOptionsTable::RowType; - using IrcServerOptionsTable = Table<Id, Owner, Server, Pass, TlsPorts, Ports, Username, Realname, VerifyCert, TrustedFingerprint, EncodingOut, EncodingIn, MaxHistoryLength, Address, Nick>; + using IrcServerOptionsTable = Table<Id, Owner, Server, Pass, TlsPorts, Ports, Username, Realname, VerifyCert, TrustedFingerprint, EncodingOut, EncodingIn, MaxHistoryLength, Address, Nick, ThrottleLimit>; using IrcServerOptions = IrcServerOptionsTable::RowType; using IrcChannelOptionsTable = Table<Id, Owner, Server, Channel, EncodingOut, EncodingIn, MaxHistoryLength, Persistent, RecordHistoryOptional>; |