Florent Le Coz
31e18e49b6
fsanitize=address requires libasan, that’s a useless dependency.
...
Also we cannot use both this feature and valgrind at the same time.
So, I’ll just specify this flag myself when I need it, this doesn’t
need to be there by default
2013-11-28 01:18:21 +01:00
Florent Le Coz
fba01f4646
Remove incomplete implementation of remove_irc_colors
2013-11-27 00:37:23 +01:00
Florent Le Coz
959291afe6
Set the parent of a node passed to add_child, and return it for conveniance
2013-11-27 00:37:23 +01:00
Florent Le Coz
12a18ca748
TIL override and final
2013-11-21 19:38:31 +01:00
Florent Le Coz
bfcc9cdc74
Send XMPP multi-line messages as multiple IRC messages
2013-11-21 00:58:14 +01:00
Florent Le Coz
70a58a8f71
Merge branch 'epolletc'
2013-11-21 00:37:01 +01:00
Florent Le Coz
b72908548d
Let the user choose the poller to use through cmake POLLER option
...
Use ccmake, or cmake -i, or cmake -DPOLLER=EPOLL, for example
2013-11-21 00:35:15 +01:00
Florent Le Coz
b569240a55
Use epoll
2013-11-21 00:35:15 +01:00
Florent Le Coz
1e122d3342
Send the motd as one single big message
...
We append each line to a string, and when the MOTD is
complete, we send that string at once.
2013-11-21 00:35:15 +01:00
Florent Le Coz
e7a441e798
Add a test for xml escape/unescape
2013-11-16 12:08:32 +01:00
Florent Le Coz
a85e1abaaa
Fix a warning
2013-11-14 23:39:28 +01:00
Florent Le Coz
641166b037
Link with pthread, required by cryptopp
2013-11-14 23:35:58 +01:00
Florent Le Coz
8c33a01e68
Include stdlib.h for atoi
2013-11-13 01:39:26 +01:00
Florent Le Coz
abce2fc92e
Do not crash on special chars in the content of message
...
That’s ugly, and we need to sanitize everything properly, and also handle
these special messages.
2013-11-13 01:36:30 +01:00
Florent Le Coz
0859801230
Handle KICK in irc channel, both ways
2013-11-13 01:24:36 +01:00
Florent Le Coz
3cfaab9a2d
Map irc commands to callbacks, in a clean way
2013-11-12 23:48:10 +01:00
Florent Le Coz
5817a95b5e
Basic handling of modes, both ways
2013-11-12 23:48:10 +01:00
Florent Le Coz
b60cbda4f9
Read the served hostname from the config file
2013-11-12 22:35:27 +01:00
Florent Le Coz
2be4811d14
Unescape XML before sending messages over IRC
2013-11-11 00:29:44 +01:00
Florent Le Coz
096a4e3baf
Handle nick changes, both ways
2013-11-11 00:24:34 +01:00
Florent Le Coz
f0d9273da6
Add a Config module, and use it to get the password from a file
2013-11-10 20:47:11 +01:00
Florent Le Coz
10d5287177
Handle private messages, both ways
2013-11-10 06:33:04 +01:00
Florent Le Coz
7ba2d0fb45
Handle the ACTION (/me) IRC command, both ways
2013-11-10 05:41:22 +01:00
Florent Le Coz
a992e281c4
Connect to localhost instead of the served hostname
...
Because the XMPP component connection is only available locally, the XMPP
servers proably only listen on 127.0.0.1 instead of 0.0.0.0.
2013-11-10 05:10:54 +01:00
Florent Le Coz
0bb7ee0127
Handle IRC QUIT command
2013-11-10 05:08:50 +01:00
Florent Le Coz
af4fc92c21
Fix the include of the config.h
2013-11-10 03:35:31 +01:00
Florent Le Coz
5cb81cace0
And actually use the values found by cmake
2013-11-10 03:29:12 +01:00
Florent Le Coz
ef014f7ddf
Properly detect iconv features to compile
2013-11-10 03:18:08 +01:00
Florent Le Coz
6a43d350be
Add include for perror
2013-11-10 03:08:45 +01:00
Florent Le Coz
3d92360310
Use the Expat library directly instead of relying on expatpp
...
And now we handle namespaces, yay.
And a nice little test.
2013-11-10 02:30:22 +01:00
Florent Le Coz
8acd7a02ae
Aaaand, I forgot to add files
2013-11-09 23:20:12 +01:00
Florent Le Coz
7c67149935
Implement part and join, both ways
2013-11-09 23:17:48 +01:00
Florent Le Coz
f38b31a63e
Remove IRC colors from the body when forwarding it to XMPP
2013-11-09 21:40:29 +01:00
Florent Le Coz
af5548897a
Cosmetic
2013-11-09 06:29:15 +01:00
Florent Le Coz
ccebe901d7
Check UTF-8 encoding, and convert strings to UTF-8
...
Handle conversion errors properly by inserting � instead. Add a binary
header to provide portable way to write binary literals (I like them) Also
add a test file. ref #2404
2013-11-09 06:01:47 +01:00
Florent Le Coz
a418b6ed5d
Send and receive messages
...
Also correctly respond to PING with the id, escape some XML content, but not
always
2013-11-07 01:53:09 +01:00
Florent Le Coz
4b76a30d04
Add make_unique.hpp and split.hpp
2013-11-06 21:01:18 +01:00
Florent Le Coz
bf7b05ef72
Implement the Bridge class to translate between the two protocols
...
Add all useful classes as well: Jid, Iid, IrcChannel, IrcUser etc to
properly keep the informations about what we receive from the IRC server.
Only handle the MUC join stanza, and send the list of users in the IRC
channel to the XMPP user, and the IRC channel’s topic, for now.
2013-11-06 21:01:18 +01:00
Florent Le Coz
dea7f60fa1
Add FindCryptoPP to the cmake search stuf
2013-11-03 17:55:39 +01:00
Florent Le Coz
d834d6ed06
Exit the poller when it handles no connection at all
2013-11-03 17:55:23 +01:00
Florent Le Coz
f2f94618fc
Add a basic XMPP component implementation, doing the authentication
2013-11-03 17:51:32 +01:00
Florent Le Coz
5bbd34a3a9
Add an XmppParser, and Stanza classes
...
Generate events on stanza and stream open/close.
Create Stanza and serialize them.
Note: XML namespaces are not handled yet.
2013-11-03 17:19:48 +01:00
Florent Le Coz
87aaacdb42
Rename libirc and libxmpp to irc and xmpp
2013-11-03 00:22:32 +01:00
Florent Le Coz
e332d7a2c0
Add initial CMakeLists.txt that compiles the current code
2013-11-02 23:49:12 +01:00
Florent Le Coz
358b53faef
Move the basic socket implementation into the SocketHandler class
...
(that is, the read/write/connect/etc)
Because this code is actually common for both the IrcClient and
XmppComponent class. These two classes have to implement some higher level
callbacks (parsing the data provided in the buffers, doing stuff when the
connection is done) instead of doing the read/write/connect low level
things.
2013-11-02 23:39:00 +01:00
Florent Le Coz
7f580dbc0e
Add irc_message.hpp
2013-11-02 16:05:55 +01:00
Florent Le Coz
4027ef8c00
Basic IRC message parsing/sending
2013-11-02 16:04:10 +01:00
Florent Le Coz
64c1b28ce2
Add some dummy main
2013-11-02 03:23:17 +01:00
Florent Le Coz
7869ef2ace
First step of the connection skeleton
...
Basic connect, socket creating, polling, recving, etc.
2013-11-02 03:19:24 +01:00