Commit Graph
373 Commits
Author SHA1 Message Date
Emmanuel Gil Peyrot e24ed4f70c Make sure XDG_CONFIG_HOME is absolute, as per XDG basedir spec. 2015-05-04 17:08:08 +02:00
Emmanuel Gil Peyrot ac30733800 Search for the config file in $XDG_CONFIG_DIR/biboumi.
This environment variable points to the location the user expects to
find every program’s config file, or if it isn’t set, ~/.config/biboumi
(with a fallback to . if $HOME isn’t set).

fix #2553
2015-05-04 16:50:35 +02:00
Florent Le Coz a8225dc54c Properly check for connecting or connected status before reconnecting
Note, in our context, is_connecting() includes the resolving part as well as
the actual connection (if we are using c-ares)

fix #3048
2015-04-21 15:38:22 +02:00
Florent Le Coz 61bfd1db00 Revert "Decode incoming JIDs local part according to xep 0106"
This reverts commit ad0465b320.

Conflicts:
	louloulibs
2015-04-21 02:48:28 +02:00
Florent Le Coz 6a28bde1dd Reset the signal handlers when SIGINT or SIGTERM is received
To avoid doing a double exit when receiving bot SIGINT and SIGTERM
2015-04-20 23:58:05 +02:00
Florent Le Coz ad0465b320 Decode incoming JIDs local part according to xep 0106
This let users send message to nicks such as Q@CServe.quakenet.org

fix #3047
2015-04-20 20:33:02 +02:00
Florent Le Coz d5324ac778 Re-order a few things in main.cpp 2015-04-13 01:53:53 +02:00
Florent Le Coz ffcce28c77 Do not log a warning when we receive a PONG command 2015-03-24 04:34:05 +01:00
Florent Le Coz 33cdc6010e Set the default value to biboumi.cfg 2015-03-04 05:56:08 +01:00
Florent Le Coz d31619714b Move non-specific adhoc commands into louloulibs
Only keep some biboumi-specific commands into biboumi_adhoc_commands.hpp/cpp
2015-03-02 11:04:55 +01:00
Florent Le Coz f0e07beacb Forgot to remove some XMPP files that are now in louloulibs instead 2015-03-02 10:21:01 +01:00
Florent Le Coz d600a2843f Remove all the libs that are now in louloulibs 2015-02-27 12:26:48 +01:00
Florent Le Coz 82256d40a3 Merge branch 'fixed_server' 2015-02-26 17:43:24 +01:00
Florent Le Coz c01befb054 Implement room discovery using the LIST irc command
ref #2472
2015-02-26 05:02:08 +01:00
Florent Le Coz 6a2240f593 Properly sanitize everything in the XML we send to the XMPP server
in this order:
- Make sure it is utf-8 encoded
- Remove all chars that are invalid in XML
- Escape all XML special chars (&'"<>)
2015-02-26 04:58:07 +01:00
Florent Le Coz 53e6b1da69 Fix the systemd-conditional code
By using SYSTEMD_FOUND instead of SYSTEMDDAEMON_FOUND, where I forgot to
rename it…
2015-02-26 02:56:46 +01:00
Florent Le Coz 5db0637810 Remove an unused parameter 2015-02-26 02:30:23 +01:00
Florent Le Coz c307df85c8 Do not handle the "%" char in a special way, in the fixed_server mode
Also fix some doc
2015-02-25 19:05:04 +01:00
Florent Le Coz 2df0ebf2df Add support for a fixed_irc_server configuration
This option lets the administrator choose a specific IRC server, and only
that server can be used with this biboumi instance.

In this mode, JIDs to use are changed like this:

- #chan%irc.example.com@biboumi.example.com      -> #chan@biboumi.example.com
- user!irc.example.com@biboumi.example.com       -> user!@biboumi.example.com
- #chan%irc.example.com@biboumi.example.com/Nick -> #chan@biboumi.example.com/Nick
- %irc.example.com@biboumi.example.com           -> no equivalent
- irc.example.com@biboumi.example.com            -> no equivalent
2015-02-25 18:35:30 +01:00
Florent Le Coz 1c43c3af4c Include the IRC hostname in the IRC RECEIVING and SENDING debug messages
fix #2715
2015-02-25 16:37:58 +01:00
Florent Le Coz 7115aa3b7f Add a reload add-hoc command 2015-02-24 16:28:30 +01:00
Florent Le Coz b86547dc1e Implement async DNS resolution using c-ares
fix #2533
2015-02-23 13:56:08 +01:00
Florent Le Coz a17135720e Fix typo 2015-02-22 18:00:35 +01:00
Florent Le Coz a50ca30e76 Use a timer to try reconnecting to the XMPP server only each 2 seconds
When the connection is lost, immediately try to reconnect, then try to
reconnect every 2 seconds.  This is much better than the previous “Try to
re-connect as fast as possible”.
2015-02-21 06:45:11 +01:00
Florent Le Coz 3032dc3580 Remove the XmppComponent::last_auth bool that was never used anywhere 2015-02-21 05:49:57 +01:00
Florent Le Coz 0038e15b5a Properly display [DEBUG] on debug lines, instead of [ERROR] 2015-02-21 05:43:20 +01:00
Florent Le Coz 03a8accc46 Fix “connections” typo 2015-02-21 05:30:36 +01:00
Florent Le Coz ae469c21ff Fix “cleanely” typo 2015-02-21 05:28:21 +01:00
Florent Le Coz 4069c5e4ac Add a missing #include for sockaddr_in6 2015-01-26 21:15:09 +01:00
Florent Le Coz 51c28a2dbb Fix the include guard of revstr.hpp 2015-01-26 21:12:40 +01:00
Florent Le Coz 2c5d3d89b0 Change IRC modes when receiving an affiliation/role change request
fix #2946
2015-01-24 17:33:04 +01:00
Florent Le Coz a447214f10 Remove a recent debug line that should not be there 2015-01-14 13:56:27 +01:00
Florent Le Coz 4203384e2a Do not send an empty password at all, if the user didn't provide one 2015-01-14 13:53:25 +01:00
Florent Le Coz 60569993b4 Make the password work when we join our first channel on that server
Because we need to wait for the welcome message, when we connect to the
server, before sending the JOIN command, we need to also save the value of
the password to reuse it when we actually send the JOIN command
2015-01-14 13:48:34 +01:00
Florent Le Coz f9e259c266 Fix a little bit of style stuf from previous commit 2015-01-14 13:36:42 +01:00
Emmanuel Gil Peyrot e4fcbd3030 Add support for password-protected IRC rooms. 2015-01-14 12:38:46 +01:00
Florent Le Coz e2e2f30894 Remove a dummy commented line 2015-01-12 22:57:08 +01:00
Florent Le Coz b79dbefbe7 If we sent a message to a user, their notices are considered private messages
fix #2882
2015-01-12 22:50:06 +01:00
Florent Le Coz f4fb961df5 And another trivial -Weffc++ warning 2014-12-17 13:55:41 +01:00
Florent Le Coz 720e31a511 Fix a few issues reported by static analyzers 2014-12-17 13:37:57 +01:00
Florent Le Coz 0ab5ecea13 Cache the result of jidprep()
Avoid doing repetitive calculations, if we call jidprep() on the same JID multiple times
2014-11-24 03:38:10 +01:00
Florent Le Coz 2bb4a347cd Improve dependencies checks in the build process
- Rename all Find*.cmake files to uppercase, to make things more consistent,
  and fix some issues with them (notably the REQUIRED flag)

- Rename SYSTEMDDAEMON to SYSTEMD and only use the libsystemd instead of
  libsystemd-daemon because it's deprecated for a long time now

- Provide a WITH_* and WITHOUT_* switch for all optional dependencies

- Document things in the INSTALL file
2014-11-13 06:44:15 +01:00
Florent Le Coz 12eeb4d11e Implement the PING on a server or the gateway itself
fix #2575
2014-11-12 08:14:56 +01:00
Florent Le Coz 80789c2e92 send_iq_result can have a "from" with just the domain name 2014-11-12 08:13:09 +01:00
Florent Le Coz 4a8bcd3cbd Implement PING to in-room participant
ref #2575
2014-11-12 08:13:02 +01:00
Florent Le Coz c20bdd6879 Add utils::revstr 2014-11-12 08:13:02 +01:00
Florent Le Coz d8da7984b2 Implement PING, user to user only (XMPP and IRC side, using CTCP PING)
ref #2757
2014-11-12 08:12:43 +01:00
Florent Le Coz e1d69806ed Rename iq_responder_callback_t to irc_… and add the equivalent to wait for iqs 2014-11-12 06:17:25 +01:00
Florent Le Coz 41e8a3ba9b Send a proper error on IRC message 438 (nickname change too fast)
fix #2576
2014-08-08 00:47:05 +02:00
Florent Le Coz e3ea0d62c7 Use generic send_presence_error() instead of almost identical specializations 2014-08-08 00:46:27 +02:00