Commit Graph
96 Commits
Author SHA1 Message Date
louiz’ e13d3fdf4d Move get_first_non_empty to louloulibs/utils 2016-08-22 21:29:22 +02:00
louiz’ d1626c929f When joining a channel, send the most recent history found in the database 2016-08-22 00:44:17 +02:00
louiz’ 0d1e0629e7 Fix the timeout test, now that we don't wait 1ms too much everytime 2016-07-28 10:47:44 +02:00
louiz’ 5c78692fcd Do not add 1ms to the timeout of our poller
Can’t remember why I did this, but that must be a stupid reason. Everything
must work even with a timeout of 0.
2016-07-28 10:35:12 +02:00
louiz’ 11a1c0cc99 Always remove all the DNS sockets on an c-ares event
Because c-ares may close one of its socket, even if it’s not the one that
has the event. Otherwise we may not know when a socket has been removed from
our poller (automatically, when close()ed) and this leads to bugs.
2016-07-28 10:34:01 +02:00
louiz’ de0eff6e94 Revert "Don’t use unique_ptr to store dns socket handlers"
This reverts commit 5328d0806f.
2016-07-27 10:04:15 +02:00
louiz’ db503b23e8 Use log_error instead of cerr 2016-07-24 20:03:34 +02:00
louiz’ fa42d0c178 Bring back DNSSocketHandler's destructor 2016-07-12 11:25:38 +02:00
louiz’ 5328d0806f Don’t use unique_ptr to store dns socket handlers 2016-07-12 11:15:42 +02:00
louiz’ 9fb2e116c4 Move reload.*pp from louloulibs to src 2016-07-12 01:15:34 +02:00
louiz’ 4c1b9abe7e Properly catch and handle database errors
Do not use a singleton for the database.

fix #3203
2016-07-12 00:31:57 +02:00
louiz’ 81f8f45b37 Replace all include guards by #pragma once
It’s $CURRENT_YEAR
2016-07-04 17:53:53 +02:00
louiz’ b2e7edeea8 Properly set the “from” of the ping results to the correct full JID 2016-06-24 11:23:01 +02:00
louiz’ 9206f4723b Fix a bug in cut() 2016-06-23 22:40:53 +02:00
louiz’ 4b1c580bb9 cut messages at 512 bytes, taking into account the UTF-8 codepoints
ref #3067
2016-06-15 15:50:45 +02:00
louiz’ 6235fb2d03 Add get_next_codepoint_size 2016-06-15 00:38:43 +02:00
louiz’ 80d0c19c5a Refactor, test and improve the way we cut too-long messages for IRC 2016-06-14 20:14:36 +02:00
louiz’ 19bca5c2f2 Add a missing return bool in Config 2016-06-14 20:08:55 +02:00
louiz’ 46ff73662c Clean the Config module, use static things instead of a stupid singleton 2016-06-14 03:02:36 +02:00
louiz’ 5a2e611617 Show off, with some variadic templates, for the logger module 2016-06-13 20:46:30 +02:00
louiz’ 28300dff5b Add a missing vector include 2016-06-08 10:31:19 +02:00
louiz’ 66609cfba2 Remove all usage of std::list 2016-06-08 01:42:43 +02:00
louiz’ a641a26327 Check the length of the JID parts when copying into the jidprep buffer
We trust the XMPP server, but maybe not enough to not check that
2016-06-02 16:03:28 +02:00
louiz’ fdddd447b3 Use “using” instead of typedef 2016-05-13 01:22:49 +02:00
louiz’ cef238e700 Do not use std::endl for each line when saving the conf file 2016-05-11 00:56:49 +02:00
louiz’ ce798b1e8c Fix build with POLLER=POLL 2016-05-10 12:50:05 +02:00
louiz’ af42073830 Style fix
Move all constructors at the top of classes
2016-05-04 14:16:40 +02:00
louiz’ 1e56c59e82 Include the Configure ad-hoc command on biboumi's JID for fixed_irc_server
Because a jid like “freenode.example.org” is both the JID for the configured
IRC server, and biboumi’s JID.

fix #3175
2016-04-27 11:03:52 +02:00
louiz’ 04d28f968b Forward the topic authors, handle the author from 333 messages
fix #2
2016-04-22 10:49:07 +02:00
louiz’ 73ad709ddf Add a TEMPORARY work-around for botan 1.11.29 2016-04-22 10:49:06 +02:00
Florent Le Coz b47179f125 Fix the ordering of poll callbacks, with ppoll too 2016-02-24 09:31:30 +01:00
Florent Le Coz b29d94444d Close the epoll fd 2016-02-24 09:31:30 +01:00
Florent Le Coz 37fd6ff18a log the handshake + stream opening/close in a more consistent way 2016-02-22 17:03:15 +01:00
Florent Le Coz 6ee80ad268 Fix the ordering of poll callbacks (recv, connect, send)
Because if we have a send event to signal the connection sucess + a recv
event to signal something to read on the socket, we need to first finish the
connect process before reading the available data. That’s what we do now.
2016-02-22 17:03:15 +01:00
Florent Le Coz 218260362f Remove unused xml_unescape() function 2016-02-10 20:23:27 +01:00
Florent Le Coz a13285d0ff Rename BasicCredentialManager 2016-02-10 20:10:40 +01:00
Florent Le Coz 0864f2ab99 Quiet a warning 2016-01-13 16:39:08 +01:00
Florent Le Coz 1f8333f23f Support a trusted SHA1 fingerprint to be configured for each IRC server 2016-01-04 13:47:27 +01:00
Florent Le Coz 79cdf170d2 Use the configured encoding value when decoding received messages 2016-01-04 13:47:26 +01:00
Florent Le Coz 9ac0d3a576 A few cleanups, and make a few things more modern 2015-12-23 11:05:55 +01:00
Florent Le Coz 9714d02018 Also store a reference instead of a pointer, in AdhocCommandsHandler 2015-12-23 11:05:54 +01:00
Stuart Mumford 8ddbe8d3e6 Make the XMPP server address configurable.
fix #3145
2015-12-13 21:04:07 +01:00
Florent Le Coz 1f6eea62f4 Add an ad-hoc command to disconnect a user from one or more IRC server
fix #3077
2015-12-03 21:15:22 +01:00
Florent Le Coz 700a6c7bc3 JID class provides bare() and full() methods 2015-12-03 21:15:22 +01:00
Florent Le Coz 756b297045 Small cleanup 2015-12-03 21:09:03 +01:00
Florent Le Coz 284af79128 Provide a “var” map in AdhocSession objects, to save values between each step 2015-12-03 21:08:04 +01:00
Florent Le Coz 6a7cd5eecf Do not forget to call freeaddrinfo, fix a memleak
For the getaddrinfo call we added in the previous commit, to convert the IP
provided in the conf.
2015-12-03 20:41:48 +01:00
Florent Le Coz 05a82b810f Display a better error when connection fails
The error should not tell “while reading” when we are just connecting.
2015-12-01 16:09:21 +01:00
Florent Le Coz 241768836d Add the outgoing_bind option
Lets the admin choose a local address to bind each outgoing (IRC) socket.
2015-12-01 16:08:40 +01:00
Florent Le Coz 296a16fa75 Do not segfault when trying to send TLS data over a not-yet connected socket 2015-11-30 03:23:42 +01:00