Commit Graph
103 Commits
Author SHA1 Message Date
louiz’ 7d0df9b6dd Disable the throttle limit if negative
Also, invalid values result in -1 being set
2018-08-23 22:18:49 +02:00
louiz’ 6c431b64d0 Fix one more warning 2018-08-23 22:16:42 +02:00
louiz’ 0b51e38281 MaxHistoryLength now has some sensible default value if the user set a negative one 2018-08-23 20:30:11 +02:00
louiz’ d7bc737751 Add two missing ref 2018-08-23 18:54:16 +02:00
louiz’ 89e038bc3a Fix the real_type of ThrottleLimit 2018-08-04 15:11:59 +02:00
louiz’ 782732ba16 Remove a bunch of useless empty lines 2018-08-04 14:50:33 +02:00
louiz’ 458ea53db3 Fix a compile error with GCC 5.x
fix #3366
2018-07-14 13:36:53 +02:00
louiz’ 52166e07ac Trivial syntax improvements 2018-06-25 22:57:13 +02:00
louiz’ 09b10cc801 Throttle all commands sent to IRC servers
fix #3354
2018-06-25 22:54:32 +02:00
louiz’ b0168fd45b mam: Send “fin complete” only when appropriate
Also simplify how we did the whole “limit + 1”
And fix one bad interpretation of the XEP for the case where the query has
no after or before restriction.

fix #3349
2018-04-29 22:18:26 +02:00
louiz’ 7592d966e6 Missing fields in a data-form response are now interpreted as an empty value 2018-04-29 01:40:46 +02:00
louiz’ 1236b8a03b Only use the ID to order archives
fix #3343
2018-04-24 20:25:40 +02:00
louiz’ 61de6b1dac Revert "Use a different Date data type"
This reverts commit 857c7d3972.
2018-04-24 20:25:40 +02:00
louiz’ a90f196a1c Revert "Use the Date to find a next page in RSM, not the id"
This reverts commit 5ef7ba0802.
2018-04-24 20:25:39 +02:00
louiz’ 5ef7ba0802 Use the Date to find a next page in RSM, not the id
This way, it works, whatever the order of insertion in the database was.

fix #3343
2018-04-14 19:48:45 +02:00
louiz’ d375a9edeb one log_debug -> log_error, also some trivial indent 2018-04-13 23:37:46 +02:00
louiz’ 4bd7b6981b Refactor that fixes a compilation issue in Release mode
Some template specialization were not found, because they were not declared
at the point they were used.

We moved things around, things are less inter-dependant, and also now it
works.
2018-04-13 23:35:06 +02:00
louiz’ de8267fa3f Fix a build warning when compiling without postgres or sqlite 2018-04-11 00:45:29 +02:00
louiz’ 857c7d3972 Use a different Date data type
PLEASE backup your database before testing this commit, and report any
migration issue.

In postgresql, we use timestamp with timezone.
In sqlite3 we use REAL (the date is expressed as julianday)

This requires a migration of the muclogline_ table:
In postgresql it’s pretty simple, we convert all the integer into timestamps

With sqlite3, we actually rename the table, create the new one with the
correct type, then copy everything to the new table, with a conversion
function for the Date_ column, and then we delete the old table.

fix #3343
2018-04-11 00:25:18 +02:00
louiz’ cdace80758 Check that db.prepare worked before using the returned statement 2018-03-23 15:54:36 +01:00
louiz’ 619c991a69 Add a nick field in the IRC server configuration form
fix #3317
2018-03-19 20:15:44 +01:00
louiz’ d7427fc9ca Re-connect to postgresql when the connection is lost
fix #3336
2018-03-19 00:16:16 +01:00
louiz’ 9500bfd4cc Reflect message IDs in channel MUCs
fix #3283
2018-03-18 19:33:07 +01:00
louiz’ 5af0a8040c Use a transaction around the DELETE + INSERT of the after_connection_commands
Otherwise we can imagine that two clients changing this value at the same
time would mix things up.

ref #3275
2018-03-18 02:54:34 +01:00
louiz’ 577984faf2 Allow the execution of multiple commands after the IRC connection
fix #3275
2018-03-18 02:31:18 +01:00
louiz’ 03714c6ceb Revert "Use std::optional<bool> instead of OptionalBool"
This reverts commit ba879a882e.
2018-03-17 17:28:47 +01:00
louiz’ d0e3c71b91 Revert "Use if constexpr to make things a lot more readable"
This reverts commit d62ca9f879.
2018-03-17 17:28:41 +01:00
louiz’ d62ca9f879 Use if constexpr to make things a lot more readable 2018-03-16 01:13:50 +01:00
louiz’ ba879a882e Use std::optional<bool> instead of OptionalBool 2018-03-16 01:13:50 +01:00
louiz’ b3b90139db Rename a few “hostname” into “address”, regarding last commit
ref #3273
2018-03-12 01:06:15 +01:00
louiz’ bb476f4a0d Allow to override the addresses used to connect to an IRC network
fix #3273
2018-03-12 01:00:17 +01:00
louiz’ 9e4a3e2b05 Fix the INSERT query for types that don’t have any Id column 2018-03-12 00:17:03 +01:00
louiz’ 8503d1f683 Actually display the error message from postgresql when a query failed 2018-02-16 00:58:49 +01:00
louiz’ b175084300 Log the warn/error messages coming from libpq in a correct format 2018-02-16 00:57:49 +01:00
louiz’ d3e07eee13 Sort archive messages by date (and only then by id)
fix #3337

Because apparently the IDs are not always incrementing. We still use them to
know the order of two messages that were received at the same second (in
this case, the ID will always be incrementing).
2018-02-16 00:56:07 +01:00
louiz’ dbb86bcc12 Fix the actual_bind versions for integrals 2018-02-15 16:54:54 +01:00
louiz’ 505deda176 Fix a memory leak when psql connection fails 2018-02-14 23:25:12 +01:00
louiz’ 4a2a280d76 Support the <before/> element in MAM requests 2018-02-13 03:51:03 +01:00
louiz’ fd7c365288 Use the same function for both history orders 2018-02-13 03:10:00 +01:00
louiz’ fd9c713938 Fix a few warnings 2018-02-11 23:39:42 +01:00
louiz’ d705541435 Send a item-not-found error when the “after” value is not in the archive 2018-02-11 23:29:58 +01:00
louiz’ 0280343ced Handle the “after” RSM value to page through results 2018-02-10 19:51:59 +01:00
louiz’ 99389eefba Always return the oldest matching messages from MAM, even if no date is set 2018-02-10 17:47:42 +01:00
louiz’ 9bf81a2c04 This should fix the int conversion warning on 32bits arch 2018-01-28 14:10:14 +01:00
louiz’ e267512ad4 Restore the is_one_of variable template 2018-01-25 02:22:19 +01:00
louiz’ 33a5f1355d Remove a variable template usage
Because it’s only supported in gcc>=5.0
2018-01-25 01:22:35 +01:00
louiz’ 7e64a2e361 Add a DEBUG_SQL_QUERIES to log info about the executed SQL queries
fix #3324
2018-01-14 21:46:49 +01:00
louiz’ 3cd6490236 Remove all the ugly database debug 2018-01-14 21:44:22 +01:00
louiz’ 286aa58c7b Remove a warning (unused argument) 2017-12-17 15:21:40 +01:00
louiz’ a557718bf2 db_name also accepts postgres:// scheme for PostgreSQL connections 2017-12-16 15:34:54 +01:00