Commit Graph
240 Commits
Author SHA1 Message Date
Florent Le Coz 5d1a567ea5 Handle the 'cancel' ad-hoc action, and return an error for unsupported actions
ref #2521
2014-06-11 00:49:42 +02:00
Florent Le Coz 3ea029dd98 Remove inactive ad-hoc sessions after a given time
ref #2521
2014-06-11 00:49:39 +02:00
Florent Le Coz 1604320a23 Make the XMPP component port configurable
fix #2541
2014-06-08 23:30:17 +02:00
Florent Le Coz 23f32ba39e Implement TLS support using Botan
For now, it tries two TLS ports and then connects to the non-tls port.  In
the future we would like the user to be able to configure that.

fix #2435
2014-06-08 05:07:54 +02:00
Florent Le Coz c530fb9156 Do not send an item-not-found presence from an invalid JID 2014-05-31 17:24:18 +02:00
Florent Le Coz 4a9beff74d Remove some unused function parameters names 2014-05-31 17:10:22 +02:00
Florent Le Coz 4e27298b3a Add an ad-hoc command to disconnect some users 2014-05-31 17:06:36 +02:00
Florent Le Coz a63faf6fa9 Use libuuid to generate unique IDs for iq and adhoc sessions 2014-05-30 13:39:00 +02:00
Florent Le Coz 86c6f36fae Add missing files (for adhoc command support) 2014-05-30 04:03:36 +02:00
Florent Le Coz d33a3b7d35 XmlNode::get_children, to get a list of matching children instead of the first 2014-05-30 04:00:29 +02:00
Florent Le Coz 6bde78b574 XmlNode’s copy constructor now recursively copies the children nodes as well 2014-05-30 04:00:23 +02:00
Florent Le Coz eb9a201870 Implement the support for adhoc commands
We have two basic example commands. But it’s not entirely finished because
there are some error checks that we don’t do.

ref #2521
2014-05-30 03:58:17 +02:00
Florent Le Coz 1c93afc9a7 Change the way the namespaces are handled in the XmlNode class 2014-05-28 17:40:45 +02:00
Florent Le Coz 6c2d03da4e Send an error presence when the connection to the IRC server fails 2014-05-28 01:27:41 +02:00
Florent Le Coz 5507adbe94 SocketHandlers own the poller and add themself into it only when the socket is created
We want to call socket() with the parameters provided by getaddrinfo, so we
can’t addd the fd into the poller immediately. We need to wait the
connection attempt, and then the SocketHandler can call add_socket_handler
itself, if the connection succeeds, or is in progress.
2014-05-27 01:01:44 +02:00
Florent Le Coz df765faab9 Only call get_last_child() if the node has children
Explain that the behaviour is otherwise undefined, in the comment.
2014-05-15 00:47:20 +02:00
Florent Le Coz 7c7da2cedb "Chat message" is not the same as "any kind of message" 2014-05-15 00:32:31 +02:00
Florent Le Coz bafde1af9f Stanza:get_name() only returns the name of the tag, without the namespace 2014-05-15 00:32:31 +02:00
Florent Le Coz 12c8b1ae0b Disconnect the user from all its IRC servers whenever he returns an error
fix #2524
2014-05-15 00:32:31 +02:00
Florent Le Coz 579ca4bdb6 Forward iq version results to IRC 2014-05-07 02:02:47 +02:00
Florent Le Coz 04fe15a1e7 Correctly do the error handling when we receive an iq 2014-05-06 23:07:30 +02:00
Florent Le Coz 5ec05cb0ed Forward CTCP version request to XMPP 2014-05-06 22:50:37 +02:00
Florent Le Coz f35db5ceba Implement next_id() to 2014-05-06 22:39:09 +02:00
Florent Le Coz c6059e5a21 Upgrade to C++14 2014-04-28 18:46:25 +02:00
Florent Le Coz ae41c5dee4 Include the xhtml-im element in private messages too 2014-04-25 00:53:59 +02:00
Florent Le Coz 6ebb586b6c Respond to a disco query the gateway jid itself 2014-04-24 19:36:14 +02:00
Florent Le Coz 98ef49e787 Fix the kick by correctly using the from and to attributes 2014-04-22 20:13:02 +02:00
Florent Le Coz 9d8166f10d Add support for systemd-daemon 2014-04-15 07:02:09 +02:00
Florent Le Coz 0d9c1ba313 Merge branch 'master' into dummy_chan 2014-04-15 04:45:59 +02:00
Florent Le Coz 804b686f1c Fix the leave-muc presence stanza 2014-04-15 04:45:20 +02:00
Florent Le Coz 7f74f62e56 Merge branch 'master' into dummy_chan 2014-04-15 04:11:27 +02:00
Florent Le Coz 020325dbb0 [WIP] DummyIrcChannel 2014-04-13 15:37:56 +02:00
Florent Le Coz d2a7fd129a Do not print an error message from expat if the error was "parsing finished" 2014-04-11 23:34:42 +02:00
Florent Le Coz f00f5c3ffb Do not use exceptions for missing tags, improvement in code simplicity 2014-04-11 23:06:13 +02:00
Florent Le Coz a20c60a0d8 Messages coming from the IRC server are of type "chat" 2014-04-10 20:11:17 +02:00
Florent Le Coz 65601a96d2 The default type for message stanza is "normal" 2014-03-28 01:48:08 +01:00
Florent Le Coz e971f64f92 Catch all exception produced by a received message (irc or xmpp) 2014-03-28 01:47:48 +01:00
Florent Le Coz 44b72b743e The absence of a from attribute is an unrecoverable error, just ignore it 2014-03-28 01:47:05 +01:00
Florent Le Coz 3c5f823621 Send a stanza error when receiving bad stanzas
Whether this is a bad-request (missing XML attributes or elements) or an
internal server error.
2014-03-28 01:16:05 +01:00
Florent Le Coz 2ffbfb71dd Idem 2014-03-24 21:29:46 +01:00
Florent Le Coz 1208ba2524 Use the correct type of error 2014-03-24 21:29:12 +01:00
Florent Le Coz e47b164a43 Send an error presence whenever a user tries to join an invalid room 2014-03-24 21:08:09 +01:00
Florent Le Coz cdc3183d9e Introduce two new bool, to know if the xmpp component should try to reconnect
If we never succeeded our connection+auth process, means we should probably
not attempt any-more, and just give up.  If we ever did, this means a
reconnect is a good idea
2014-03-24 20:39:59 +01:00
Florent Le Coz ffc820e234 Reconnected immediately to the XMPP whenever it closes the connection 2014-03-24 20:31:02 +01:00
Florent Le Coz e196d2f1f4 Do not send data if we are connected, send it only once we actually are 2014-03-24 18:37:31 +01:00
Florent Le Coz db6ea52b44 Provide details about what error the XML parser encountered 2014-02-28 01:18:21 +01:00
Florent Le Coz 86d4347af8 Avoid unnecessary copies by recv()ing data directly into the expat buffer 2014-02-28 01:14:38 +01:00
Florent Le Coz f6029d5bcf Add missing stdexcept includes 2014-02-24 21:03:51 +01:00
Florent Le Coz 99aba5667d Connection to servers does not block the process anymore 2014-02-22 21:42:24 +01:00
Florent Le Coz 61ca40fa0e Delete empty bridges objects 2014-02-20 02:31:16 +01:00