louiz’
e31ff3e9e9
Fix some issues found by sonar cube
2017-01-06 23:45:26 +01:00
louiz’
17411e6b44
Fix an use-after-free
...
Because we “delete all node” and then we use the content of one of these
nodes we got earlier.
2017-01-06 23:09:17 +01:00
louiz’
5a5bb7f632
Introduce a XmlSubNode class that automatically adds itself into its parent
2016-12-14 18:28:44 +01:00
louiz’
f512c9c666
e2e: test connection failure
2016-12-14 18:20:57 +01:00
louiz’
ca86189412
Include the <text/> element in stanza error when there IS a text
2016-12-13 23:57:19 +01:00
louiz’
810c4343c7
Remove the useless nullptr argument for the XmlNode constructor
2016-12-13 23:01:32 +01:00
louiz’
2e4a9fe4c7
Include the optional <text/> node in the send_presence_error
2016-12-13 22:47:19 +01:00
louiz’
c65ae47549
Auto accept presence subscription
2016-12-12 00:39:03 +01:00
louiz’
0c8adc85f7
Move all the connect() logic from TCPSocketHandler into a subclass
...
This way, TCPSocketHandler only deal with the message sending/receiving, not
the connect() or anything else. This will be used for implementing servers
(because when a client is accepted, we don’t need all the connect() and dns
resolution stuff).
2016-11-11 02:54:48 +01:00
louiz’
b5beb04332
Remove a never reached (and non-sensical) error
2016-11-07 21:57:39 +01:00
louiz’
ae02e58b9d
Some cleanups
2016-10-31 14:03:37 +01:00
louiz’
8c26b4d19f
Remove unused roster code
2016-10-31 02:01:01 +01:00
louiz’
021f025cb0
Refactor the sha1 digest into its own function, and do not use sprintf
2016-10-26 21:19:53 +02:00
louiz’
dfc0793ef2
Include a private and no-copy nodes in private <message/> to avoid carbon duplication
2016-10-11 00:43:46 +02:00
louiz’
8ac8d2b242
Correctly set status="110" in the presence for the target of a kick
2016-10-07 23:28:40 +02:00
louiz’
1d197ff26c
Respond to muc#traffic requests
...
fix #3069
2016-10-04 19:32:45 +02:00
louiz’
76a8189b46
Implement result-set-management for LIST queries
...
ref #2948
2016-10-03 01:08:48 +02:00
louiz’
265b5df61b
Re-add the ad-hoc command the was removed by mistake in the previous commit
...
Thank you, e2e tests
2016-09-29 23:10:41 +02:00
louiz’
ee4cf5dc2d
Add AdhocCommandHandlers::add_command to simplify the usage of this class
...
And make things a little bit clearer
2016-09-29 20:53:40 +02:00
louiz’
363a0bf02c
Look for uuid/uuid.h instead of just uuid.h
...
Avoids a conflict between /usr/include/uuid.h and
/usr/local/include/uuid/uuid.h on freebsd
2016-09-29 20:11:35 +02:00
louiz’
3047bd41b2
MAM results can be filtered by start and end dates
2016-09-04 22:58:38 +02:00
louiz’
9727f4cf00
Add the missing includes back
2016-08-29 19:20:27 +02:00
louiz’
7536a1b3f3
Respond to MAM requests on a channel JID
...
At the moment, result-set-management is not implemented, the whole history
(well, at most 1024 messages) is returned.
2016-08-28 22:42:50 +02:00
louiz’
b59fc2a834
Use Z instead of z in the timestamp format
2016-08-23 20:52:37 +02:00
louiz’
a195939cda
Don't use put_time() because it’s not in gcc 4.9, in shitty-debian “stable”
...
Use strftime instead
2016-08-23 20:48:39 +02:00
louiz’
5e59cc517f
Add missing ctime include
2016-08-22 20:25:41 +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’
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’
5a2e611617
Show off, with some variadic templates, for the logger module
2016-06-13 20:46:30 +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’
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
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
218260362f
Remove unused xml_unescape() function
2016-02-10 20:23: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
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
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