Florent Le Coz
7e2427148e
Use references instead of raw pointer, to store the “parent” object
...
In Bridge and IrcClient
2015-12-21 14:51:26 +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
6dcb21a032
Document the fact that the joining-nick is ignored
...
fix #2695
2015-11-30 21:29:50 +01:00
Florent Le Coz
a2fb3d0520
Rename the CI build where we run the coverage
2015-11-30 05:07:01 +01:00
Florent Le Coz
87d00ebe2d
Coverage cannot run with clang++
2015-11-30 05:06:23 +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
Florent Le Coz
0620c8e589
Avoid leaking socket filedescriptors
...
When trying the various results of getaddrinfo, we forgot to close the
socket when one fails, before trying the next one.
Also use the destructor to make sure we do not have some other unrelated
leak.
2015-11-07 23:41:06 +01:00
Florent Le Coz
5027b21fd1
Add verifyCert field into the database
2015-11-05 19:08:19 +01:00
Florent Le Coz
73dffca24e
Only include the coverage flags when compiling with gcc
2015-11-05 16:40:09 +01:00
Florent Le Coz
de6335b994
Fix a clang warning
2015-11-05 02:37:46 +01:00
Florent Le Coz
a44372e1b1
Add a CI build with clang
2015-11-05 02:22:00 +01:00
Florent Le Coz
5ce9d3f142
Make the CA file configurable
2015-11-05 02:17:19 +01:00
Florent Le Coz
e8386bd14e
Provide an adhoc option to let user pass the cert verif for some IRC servers
2015-11-05 02:17:19 +01:00
Florent Le Coz
06db9b366a
Fix the build without botan, caused by credentials_manager
2015-11-02 17:31:35 +01:00
Florent Le Coz
4a51850173
Verify TLS certificate with the given hostname, instead of a hardcoded one
2015-11-02 17:15:32 +01:00
Florent Le Coz
0a4041f7e9
Fix the initial IRC nickname (was using realname, by mistake)
2015-11-02 17:14:21 +01:00
Florent Le Coz
f928f76272
Verify the remote TLS certificates using the system-wide trusted CAs
2015-11-02 03:26:13 +01:00
Florent Le Coz
7e07a17420
Fix the logger test when built without systemd
2015-10-31 15:41:05 +01:00
Florent Le Coz
6430479a3a
Add a IoTester class
2015-10-31 06:25:47 +01:00
Florent Le Coz
6fb4cf5e4d
Do not forget to implement a method
2015-10-31 06:23:51 +01:00
Florent Le Coz
ccd185d3f5
Remove a useless assignment
2015-10-31 06:18:29 +01:00
Florent Le Coz
34fc1d4010
Implement a basic webirc support
...
See https://kiwiirc.com/docs/webirc
fix #3135
2015-10-31 06:17:35 +01:00
Florent Le Coz
2c932cf0f7
Fix the double sending of the USER command
2015-10-31 05:36:33 +01:00
Florent Le Coz
6c42286109
Remove some useless includes
2015-10-31 05:36:18 +01:00
Florent Le Coz
4dd01a29ca
Run the database tests with an in-memory sqlite db
2015-10-31 05:35:59 +01:00
Florent Le Coz
66887c225b
Add a few tests
2015-10-31 05:35:46 +01:00
Florent Le Coz
73fd710cfd
Only run “make coverage” in one CI build
2015-10-31 01:48:34 +01:00
Florent Le Coz
b8b2d4f985
Remove the build+test script, just specify everything in the CI file
2015-10-30 18:14:17 +01:00
Florent Le Coz
cfa754edb8
Add a .gitignore file
2015-10-29 04:07:46 +01:00
Florent Le Coz
f03d1a16dd
Only download Catch when the test_suite target is built
2015-10-29 03:55:57 +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
9fe94215da
Make lcov gcov etc optional
...
make coverage will display an error instead
2015-10-29 03:20:39 +01:00
Florent Le Coz
3b7bbe1472
make coverage is only available with a debug build
2015-10-29 02:52:24 +01:00
Florent Le Coz
db5e02a0a6
Document the test and coverage things in the INSTALL file
2015-10-29 02:45:58 +01:00
Florent Le Coz
6ae7e08c52
Add code coverage support
...
make coverage runs the test_suite and generates a report
2015-10-29 02:33:05 +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
4e32fe213c
Refactor XmppParser::end_element to make it clearer
...
Both for me, and apparently for clang static analyzer, who reported a (imo)
false positive.
2015-10-28 02:32:19 +01:00
Florent Le Coz
450de4c336
Style, add a few “this->”
2015-10-26 20:28:36 +01:00
Florent Le Coz
142516a69b
Fix some trivial issues reported by cppcheck
2015-10-26 20:09:39 +01:00
Florent Le Coz
0fcba76c79
Fix a build issue when compiling without cares
2015-10-26 20:01:57 +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
d799dc10b6
Test a different way to do our CI
...
Introduce a script, which is called with different parameters, to have a
number of builds done with a different configuration, without repeating
things too much.
2015-10-26 20:00:52 +01:00
Florent Le Coz
c8606e1858
Remove a unused_parameter warning
2015-10-26 02:45:20 +01:00
Florent Le Coz
f57a43f337
Remove some more debug thing
2015-10-26 02:43:33 +01:00
Florent Le Coz
42a743faeb
Introduce a basic .gitlab-ci.yml file
2015-10-26 02:40:45 +01:00
Florent Le Coz
ec53fc9315
Remove some debug thing that should not have been committed
2015-10-26 02:36:33 +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
bf30b4498f
Add the network module to the test_suite
...
Because we added a network unit test
2015-10-24 15:16:58 +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
2928598e77
Catch TLS exceptions, close the connection and inform the user of the error
2015-09-22 03:59:14 +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
1031989fe2
XmlNode::add_child can also take a copy of a node
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
19666d2ffd
Store the target jid in the AdhocSession objects
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
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