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
a350caf6e0
Move the logging + config test on first position
2014-05-28 17:40:45 +02:00
Florent Le Coz
d9d30dd782
Use a timed event to force the exit 2 seconds after an exit signal is received
...
fix #2469
2014-05-28 17:31:28 +02:00
Florent Le Coz
5999e6e0c3
Introduce the timed events
2014-05-28 17:31:28 +02:00
Florent Le Coz
e033b6a3ae
On connection in-progress, save the whole addrinfo struct, not just ai_addr
2014-05-28 02:03:36 +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
7b31bea75b
Only close/unmanage the socket if we are connected/connecting
...
Since the socket is now only created and managed whenever the connection is
being established, we only close the socket and if it was created (we use -1
to denote the fact that is not yet created, or has been closed) and we only
unmanage the socket if it is effectively managed.
fix #2529
2014-05-27 23:47:45 +02:00
Florent Le Coz
34739728f9
Fix a by-one error in the CHANTYPES parsing
2014-05-27 02:35:39 +02:00
Florent Le Coz
aea923bcb9
Use the CHANTYPES values to differentiate channel or user notices
...
It also happens to fix #2517 because this used to create buggy channels
named "auth" and stuf like that.
2014-05-27 02:30:11 +02:00
Florent Le Coz
796af0531e
Add support for CHANTYPES isupport element, to know the prefixes of channels
2014-05-27 02:17:58 +02:00
Florent Le Coz
23e8e32f84
Support IPv6 connections
...
fix #2522
2014-05-27 01:06:45 +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
6b0ffb5fc2
If both write and read events are available on a socket, only do the read
...
Because the read handler may discover that the connection has been closed,
and then remove the socket from the poller. It that case it is no longer
valid to try to call the write handler (which may try to reconnect, but
since that socket is no longer managed, this is not OK).
2014-05-26 22:27:43 +02:00
Florent Le Coz
7fb0b671bb
Also do that cut of message on \n for private messages, and handle /me
2014-05-25 17:50:03 +02:00
Florent Le Coz
01cd6eb516
Split the messages on \n when sending them back to the XMPP user
2014-05-25 17:49:58 +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
712b7bdfdf
Correctly handle the usage of ! as a IRC user mode indicator
...
Since “!” is also the separator between the nickname and the user hostname,
having “!” as the user mode (e.g. !nick!~some@host.bla ) would cause the nick
to be empty. Now we skip it if it is a valid user mode indicator.
2014-05-14 21:48:38 +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
28d244631d
Add missing std::string_literals
2014-04-29 23:51:32 +02:00
Florent Le Coz
65f219594d
Fix a little indentation
2014-04-29 21:56:05 +02:00
Florent Le Coz
f6e6b8905b
Use C++14 string_literals
2014-04-29 21:50:13 +02:00
Florent Le Coz
594bac1e84
Remove binary.hpp and use the c++14 feature 0b
2014-04-28 19:44: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
4e61b0d57e
The author name from messages from the server are now nicely formated
2014-04-25 00:53:08 +02:00
Florent Le Coz
77a84fd2d9
NOTICE from channels are displayed in the channel, with a green "[notice]"
2014-04-25 00:35:57 +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
bd8a5a505e
The logging test is less ambiguous
2014-04-21 23:03:58 +02:00
Florent Le Coz
e847084b00
Improve the test on jidprep
2014-04-21 22:59:16 +02:00
Florent Le Coz
4b5d2d11c5
test.cfg file is now created by the test suite
2014-04-21 22:56:22 +02:00
Florent Le Coz
848b50185f
Remove unused action_prefix_len variable
2014-04-21 22:47:20 +02:00
Florent Le Coz
114007f10d
Actually do the last commit, but completely this time
2014-04-18 10:46:25 +02:00
Florent Le Coz
bd7936bdfe
No more missing text when converting IRC colors to xhtml-im
...
fix #2496
2014-04-17 20:37:46 +02:00
Florent Le Coz
9d8166f10d
Add support for systemd-daemon
2014-04-15 07:02:09 +02:00
Florent Le Coz
58a2c00d44
Call on_connection_failed() when the connection fails to be established
2014-04-15 06:47:38 +02:00
Florent Le Coz
f7b75d7eb4
Remove a useless debug log line
2014-04-15 06:42:00 +02:00
Florent Le Coz
3bc6f18347
Add an explanatory topic on the dummy channel
2014-04-15 05:22:32 +02:00
Florent Le Coz
14b6793d7f
Joining the dummy channel connects to the irc server
2014-04-15 05:11:36 +02:00
Florent Le Coz
28065d3d52
Do not disconnect from the IRC server if the dummy channel is joined
2014-04-15 05:08:07 +02:00
Florent Le Coz
5739d418e2
Better way to leave the dummy room
2014-04-15 04:56:50 +02:00