Florent Le Coz
6c42286109
Remove some useless includes
2015-10-31 05:36:18 +01:00
Florent Le Coz
580b721ba5
Remove a write to std::cout from Database’s constructor
2015-10-29 03:35:25 +01:00
Florent Le Coz
3c1889fbd0
Use Catch for our test suite
...
`make check` is also added to compile and run the tests
Catch is fetched with cmake automatically into the build directory when needed
2015-10-29 02:32:57 +01:00
Florent Le Coz
142516a69b
Fix some trivial issues reported by cppcheck
2015-10-26 20:09:39 +01:00
Florent Le Coz
e43ca29e94
Fix the jidprep tests when built without libidn
2015-10-26 20:01:57 +01:00
Florent Le Coz
e46b9cfc6e
Display a success message at the end of the test suite
2015-10-24 15:24:40 +02:00
Florent Le Coz
e7a91badcd
Use “using” instead of typedef
2015-10-24 15:21:05 +02:00
Florent Le Coz
2c89b9f193
Remove an unused include
2015-10-24 15:20:29 +02:00
Florent Le Coz
83bd57b190
Some little fixes in test.cpp
2015-10-24 15:19:55 +02:00
Florent Le Coz
74c73799ab
Only compile database.cpp if configured with litesql
2015-10-24 15:17:53 +02:00
Florent Le Coz
aa340e1c5e
Separate the DNS resolution logic from the TCP communication logic
...
fix #3137
2015-10-15 04:32:02 +02:00
Florent Le Coz
1aa2c2d857
Introduce the realname_from_jid option
...
When set to true, the realname and username are extracted (by default) from
the user’s JID
fix #3136
2015-10-12 17:14:29 +02:00
Florent Le Coz
84aafab604
Provide the “realname_customization” option
...
ref #3136
2015-10-12 16:47:27 +02:00
Florent Le Coz
6512f830fa
The realname is also saved as an IrcClient member
2015-10-12 16:35:50 +02:00
Florent Le Coz
60d340be19
TIL std::string::end and std::string::begin…
2015-09-23 19:11:48 +02:00
Florent Le Coz
2380a84ba5
Make sure the user-provided username does not contain spaces
2015-09-23 19:08:18 +02:00
Florent Le Coz
f904d57940
Provide username and realname IRC server options
...
Used in the USER command when connecting to the IRC server, instead of the
first nick.
fix #3028
2015-09-23 18:47:29 +02:00
Florent Le Coz
f6d9b7d7a1
Fix two small warnings
2015-09-22 04:01:09 +02:00
Florent Le Coz
7247228e97
Connection may be closed from our side too
2015-09-22 03:50:08 +02:00
Florent Le Coz
ceec989077
Add a field (in the configure form) to specifiy an after-connect IRC command
2015-09-21 18:56:37 +02:00
Florent Le Coz
890cfe9099
Provide Ports and TLS Ports IRC-server ad-hoc options
...
This let any user choose which ports to use when connecting to the IRC
server. This also lets the user choose whether or not to force TLS usage (by
setting no non-TLS port).
fix #2731
2015-09-21 04:27:23 +02:00
Florent Le Coz
532228a3ce
Send a PASS IRC command if the “pass” config is sot by a user, on an IRC server
...
fix #3068
2015-09-18 22:09:26 +02:00
Florent Le Coz
1691cf8f64
Introduce the configure ad-hoc command on irc servers
...
Provides two options for now, and they have no effect yet
2015-09-18 22:09:26 +02:00
Florent Le Coz
f1de6d0320
Add Bridge::get_bare_jid
2015-09-18 22:09:26 +02:00
Florent Le Coz
45e8fe56a6
Add an AdhocCommandsHandler to store commands specific to IRC servers
2015-09-18 22:09:26 +02:00
Florent Le Coz
88ae2599f6
Introduce an optional Database module
...
Uses litesql
2015-09-18 22:09:26 +02:00
Florent Le Coz
33fa1dcd5a
Also a xdg_data_path
2015-09-18 21:50:54 +02:00
Florent Le Coz
ea0b2f2bb8
Create a xdg_path function
2015-09-18 09:20:15 +02:00
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
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
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
ece4b4969b
If hostname resolution fails, do not try all possible ports
2015-07-09 15:30:24 +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
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
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
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
221ed2553d
Two trivial fixes
2015-05-07 17:18:40 +02:00