Commit Graph
93 Commits
Author SHA1 Message Date
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 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 ece4b4969b If hostname resolution fails, do not try all possible ports 2015-07-09 15:30:24 +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 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 7fe0dc2667 Fix the case of the nick for ping requests
fix #3041
2015-05-11 05:31:11 +02:00
Florent Le Coz 221ed2553d Two trivial fixes 2015-05-07 17:18:40 +02:00
Florent Le Coz 163ace553f Handle all unknown IRC command by forwarding the arguments as a message body
This way, the users can receive the result of any IRC command (although not
parsed nor formatted in anyway) when biboumi doesn’t support it

fix #2884
2015-05-07 17:17:01 +02:00
Florent Le Coz 0a6b673b14 Support raw IRC messages
Messages received on an IRC server JID are forwarded as raw IRC messages.

fix #2486
2015-05-07 17:01:17 +02:00
Florent Le Coz a8225dc54c Properly check for connecting or connected status before reconnecting
Note, in our context, is_connecting() includes the resolving part as well as
the actual connection (if we are using c-ares)

fix #3048
2015-04-21 15:38:22 +02:00
Florent Le Coz ffcce28c77 Do not log a warning when we receive a PONG command 2015-03-24 04:34:05 +01:00
Florent Le Coz d600a2843f Remove all the libs that are now in louloulibs 2015-02-27 12:26:48 +01:00
Florent Le Coz c01befb054 Implement room discovery using the LIST irc command
ref #2472
2015-02-26 05:02:08 +01:00
Florent Le Coz 1c43c3af4c Include the IRC hostname in the IRC RECEIVING and SENDING debug messages
fix #2715
2015-02-25 16:37:58 +01:00
Florent Le Coz a447214f10 Remove a recent debug line that should not be there 2015-01-14 13:56:27 +01:00
Florent Le Coz 4203384e2a Do not send an empty password at all, if the user didn't provide one 2015-01-14 13:53:25 +01:00
Florent Le Coz 60569993b4 Make the password work when we join our first channel on that server
Because we need to wait for the welcome message, when we connect to the
server, before sending the JOIN command, we need to also save the value of
the password to reuse it when we actually send the JOIN command
2015-01-14 13:48:34 +01:00
Emmanuel Gil Peyrot e4fcbd3030 Add support for password-protected IRC rooms. 2015-01-14 12:38:46 +01:00
Florent Le Coz e2e2f30894 Remove a dummy commented line 2015-01-12 22:57:08 +01:00
Florent Le Coz b79dbefbe7 If we sent a message to a user, their notices are considered private messages
fix #2882
2015-01-12 22:50:06 +01:00
Florent Le Coz d8da7984b2 Implement PING, user to user only (XMPP and IRC side, using CTCP PING)
ref #2757
2014-11-12 08:12:43 +01:00
Florent Le Coz e1d69806ed Rename iq_responder_callback_t to irc_… and add the equivalent to wait for iqs 2014-11-12 06:17:25 +01:00
Florent Le Coz 41e8a3ba9b Send a proper error on IRC message 438 (nickname change too fast)
fix #2576
2014-08-08 00:47:05 +02:00
Florent Le Coz e3ea0d62c7 Use generic send_presence_error() instead of almost identical specializations 2014-08-08 00:46:27 +02:00
Florent Le Coz 11a31db2d5 Send the reason of the connection close to the user 2014-07-15 15:39:25 +02:00
Florent Le Coz 04d999168a Add a level of inheritance above SocketHandler
SocketHandler has been renamed to TCPSocketHandler
SocketHandler is now a simple interface with a few methods, used only by
Poller.

This way we can inherite from the new SocketHandler class, to handle other
types of sockets, and still make them manageable by the poller without any
change in the Poller class.
2014-07-02 03:01:09 +02:00
Florent Le Coz 26ffc8fe12 Implement a way to add callbacks, waiting for an IRC event to return an iq 2014-06-19 22:21:49 +02:00
Florent Le Coz a705b9af7b Remove a duplicate “connection closed” message 2014-06-19 01:10:13 +02:00
Florent Le Coz 7c1a38999c Rewrite the whole IID usage
IRC users and channels are now distinguished by the separator used in the
IID (% or !).

ref #2468
2014-06-11 02:37:11 +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 c2311b2893 Send (every 240s) a PING command to all connected irc servers
fix #2452
2014-05-30 16:08:23 +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 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 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 579ca4bdb6 Forward iq version results to IRC 2014-05-07 02:02:47 +02:00
Florent Le Coz 5ec05cb0ed Forward CTCP version request to XMPP 2014-05-06 22:50:37 +02:00
Florent Le Coz f6e6b8905b Use C++14 string_literals 2014-04-29 21:50:13 +02:00
Florent Le Coz c6059e5a21 Upgrade to C++14 2014-04-28 18:46:25 +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 3bc6f18347 Add an explanatory topic on the dummy channel 2014-04-15 05:22:32 +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
Florent Le Coz cfca16bbec Ability to leave the dummy channel 2014-04-15 04:44:51 +02:00
Florent Le Coz 576fb3d132 Correctly use the dummy channel whenever we interract with an empty-string chan 2014-04-15 04:44:09 +02:00
Florent Le Coz 020325dbb0 [WIP] DummyIrcChannel 2014-04-13 15:37:56 +02: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 e196d2f1f4 Do not send data if we are connected, send it only once we actually are 2014-03-24 18:37:31 +01:00