Florent Le Coz
73573ebb2a
Trivial cleanup in irc_client.cpp
2015-09-06 18:57:35 +02:00
Florent Le Coz
4cfcc79114
Check the number of argument of every IRC command received from the server
...
Each IrcClient callback has a max and min size of argument, we call the
callback only if the parsed message has a correct number of arguments,
otherwise it is ignored (with a warning logged).
2015-09-06 18:55:48 +02:00
Florent Le Coz
c3309d0acf
Trivial cleanup
2015-09-01 20:01:44 +02:00
Florent Le Coz
f3b3d937ae
Use unique_ptr to store the XmlNode’s children
...
Also fix some constness things
2015-09-01 14:47:57 +02:00
Florent Le Coz
38564d77c7
Little cleanup of the XmlNode class
...
Use map instead of unordered map (it's not slower, and it's shorter).
Use the default move constructor.
2015-09-01 04:56:06 +02:00
Florent Le Coz
d7e1214cbc
XmlNode::to_string uses an ostringstream instead of a string
...
On my poor benchmark, it was infinitesimally faster.
2015-09-01 04:53:12 +02:00
Florent Le Coz
e8f22efe34
XmlNodes are now always closed
...
Remove the close() method and closed attribute. Remove all the calls to
close(). (Save one bool per XmlNode, yay, and save a few ifs and some
useless function calls. At best it should be unnoticeably faster and lighter
and save a few keystrokes in the future)
2015-09-01 04:42:12 +02:00
Florent Le Coz
df006a1916
//mode with no argument should work
...
The server will respond with the current channel mode, in private or
something
2015-08-19 21:22:46 +02:00
Florent Le Coz
525f452cbc
louloulibs is part of the repository, so no need to check for its presence
2015-07-15 21:17:34 +02:00
Florent Le Coz
45fd41eb38
Display the resolved IP in debug logs
2015-07-09 15:30:54 +02:00
Florent Le Coz
ece4b4969b
If hostname resolution fails, do not try all possible ports
2015-07-09 15:30:24 +02:00
Florent Le Coz
ac6a74595c
Send the cares error message before cleaning it
...
fix #3083
2015-07-09 14:35:29 +02:00
Florent Le Coz
4130f1679d
Check for timeouts on the DNS resolution using c-ares
...
ref #3083
2015-07-09 14:35:29 +02:00
Florent Le Coz
a42af9e700
Fix the log_* macros to not have two ; at the end of lines
2015-07-09 13:49:08 +02:00
Florent Le Coz
0af536a2be
Minor comment typo
2015-07-08 18:51:05 +02:00
Florent Le Coz
810ea19fe3
Exit with 1 if the connection to the XMPP server fails
...
This helps the system understand if the process started correctly or not,
when systemd is not used
fix #3078
2015-06-10 16:47:13 +02:00
Florent Le Coz
7f7c429ae4
Do not send the admin-only adhoc commands to non-admin users
...
They were not able to execute them anyway, so this was just a little
usability issue.
2015-06-09 14:52:46 +02:00
Florent Le Coz
8da03f9830
Remove a useless duplicate method
2015-06-09 14:51:55 +02:00
Florent Le Coz
a004261733
Bump to 3.0~dev
2015-06-04 04:32:03 +02:00
Florent Le Coz
c649e56deb
Release version 2.0
2015-05-28 23:58:14 +02:00
Florent Le Coz
427df5fc2a
Revert "Use git-archive-all in the make dist, to include the submodules in the archive"
...
This reverts commit 54f96debca .
2015-05-28 23:46:24 +02:00
Florent Le Coz
e1a7114c8d
louloulibs is directly included, instead of being a submodule
...
Because this is a nightmare to manage
2015-05-28 23:46:24 +02:00
Florent Le Coz
897b281e67
Avoid some potential race conditions by blocking the signals we manage
...
They are atomically unblocked in the ppoll/epoll_pwait calls, avoiding any
race condition on the check of the “stop” or “reload” booleans.
2015-05-27 23:44:23 +02:00
Florent Le Coz
54f96debca
Use git-archive-all in the make dist, to include the submodules in the archive
2015-05-26 14:00:25 +02:00
Florent Le Coz
074286efa9
Fix the date format in CHANGELOG file
2015-05-19 23:09:17 +02:00
Florent Le Coz
2f495a60cf
Update the changelog
2015-05-19 07:02:04 +02:00
Florent Le Coz
e454c12bd7
Do not forward CTCP commands (PING, VERSION…) to the user as private messages
...
Some XMPP client ping themselves inside MUCs, to know if they are still in
there, this created a flood of PING message in private. If the user is
interested in knowing when they receive a ping or version request, they can
still read their XML logs
2015-05-19 06:43:38 +02:00
Florent Le Coz
a2b0f21a96
Document the listing of channels
...
fix #2472
2015-05-19 06:22:15 +02:00
Florent Le Coz
e8d7965115
Handle errors for the LIST irc command
...
ref #2472
2015-05-19 06:22:04 +02:00
Florent Le Coz
fa466f33f4
Ignore commands that flood the user with private messages when listing chans
...
ref #2472
2015-05-19 06:21:59 +02:00
Florent Le Coz
2195292919
Remove a debug line (breaking our PING stuf) that should not have been commited
2015-05-19 05:15:49 +02:00
Florent Le Coz
501a3f7be2
Fix the way we we forward an XMPP ping result to the IRC server
...
Our CTCP notice didn't include a \01 char at the end. We thus failed to
check the PING id when we received it ourself, because one char was missing
2015-05-19 05:13:55 +02:00
Florent Le Coz
fbeb5af364
Update to latest louloulibs revision, and add test for hostname validity
...
fix #2694
2015-05-13 20:17:43 +02:00
Florent Le Coz
763be827c9
Fix a message.arguments size check
2015-05-11 05:43:32 +02:00
Florent Le Coz
cc1255d216
Fix the way we check for the PING id
2015-05-11 05:31:47 +02:00
Florent Le Coz
7fe0dc2667
Fix the case of the nick for ping requests
...
fix #3041
2015-05-11 05:31:11 +02:00
Florent Le Coz
ad5bd99618
Properly send error response on presence stanzas
2015-05-11 05:03:09 +02:00
Florent Le Coz
5475d16b57
Return a stanza error whenever the IRCClient for a given server does not exist
...
Instead of ignoring the stanza, we send back an error of type
remote-server-not-found each time it's possible.
Also avoid having to do if (!irc) return; everytime.
fix #3045
2015-05-11 04:47:31 +02:00
Florent Le Coz
71fec776c4
Update to latest louloulibs
...
fix #3042
2015-05-07 17:42:37 +02:00
Florent Le Coz
221ed2553d
Two trivial fixes
2015-05-07 17:18:40 +02:00
Florent Le Coz
163ace553f
Handle all unknown IRC command by forwarding the arguments as a message body
...
This way, the users can receive the result of any IRC command (although not
parsed nor formatted in anyway) when biboumi doesn’t support it
fix #2884
2015-05-07 17:17:01 +02:00
Florent Le Coz
0a6b673b14
Support raw IRC messages
...
Messages received on an IRC server JID are forwarded as raw IRC messages.
fix #2486
2015-05-07 17:01:17 +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
d79850f984
Document how to address a nick with @ character
...
fix #3047
2015-04-21 02:55:39 +02:00
Florent Le Coz
e46c3c004d
Do not specify an ExecStop= line in the unit file
2015-04-21 02:51:10 +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
0d706741c6
Update louloulibs submodule to the correct revision
2015-04-20 20:35:32 +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
c243fea660
Update to latest louloulibs revision
2015-03-04 05:56:44 +01:00
Florent Le Coz
33cdc6010e
Set the default value to biboumi.cfg
2015-03-04 05:56:08 +01:00
Florent Le Coz
d88ec5fdf1
Update to latest louloulibs revision
2015-03-02 11:32:18 +01:00
Florent Le Coz
e4c696861d
Update louloulibs to last revision
2015-03-02 11:06:40 +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
649ebaf1b9
Suggest the command git submodule update --init
2015-02-27 18:32:30 +01:00
Florent Le Coz
cc6a2295c3
Fix a typo
2015-02-27 17:50:42 +01:00
Florent Le Coz
b3503bf112
Also check if the louloulibs/CMakeLists.txt file is missing
...
Because apparently when cloning a repository with submodules, git creates
empty sub-directories
2015-02-27 12:46:22 +01:00
Florent Le Coz
e6569a1090
Only use include_directory() if the directory path is defined
2015-02-27 12:40:50 +01:00
Florent Le Coz
0ec82c104d
Add louloulibs as a submodule
2015-02-27 12:26:48 +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
1028d4d549
Add a changelog entry for the fixed_irc_server option
2015-02-26 17:46:51 +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
89af57bfcd
Forge link uses https
2015-02-25 16:27:23 +01:00
Florent Le Coz
7115aa3b7f
Add a reload add-hoc command
2015-02-24 16:28:30 +01:00
Florent Le Coz
9837f611d9
Update the CHANGELOG and INSTALL files, mentioning c-ares
2015-02-23 14:03:00 +01:00
Florent Le Coz
7ec1f1242f
Add the FindCARES cmake module
2015-02-23 13:56:08 +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
a37573513b
Add a tl;dr section in the INSTALL file
2015-01-28 00:53:40 +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
fd0a3225be
Document the new affiliation/role stuff, and update changelog
2015-01-24 18:03:00 +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
ddc989ce5d
Update changelog with the password feature
2015-01-14 13:54:21 +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
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
0ee47f628d
Fix the cmake LIBUUID_INCLUDE_DIRS value when we are not using pkg-config
2015-01-10 04:19:33 +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
7bfe695c2f
Use hardened_build 1 in the spec file
...
See http://fedoraproject.org/wiki/Packaging:Guidelines#PIE
2014-11-13 06:54:30 +01:00