Florent Le Coz
7701c90763
Add missing errno.h includes
2014-01-04 02:48:08 +01:00
Florent Le Coz
d90c1978de
Fix a bug when receiving a topic change
...
The number of arguments is not always the same
2014-01-04 01:59:36 +01:00
Florent Le Coz
fbec16f1a2
Possibility to change a channel's topic
2014-01-04 01:59:36 +01:00
Florent Le Coz
e840704b58
Convert received modes into roles and affiliations
2014-01-04 01:59:36 +01:00
Florent Le Coz
baf03a7e20
Do not throw an exception when recv returns and error, just close the socket
2014-01-04 01:59:36 +01:00
Florent Le Coz
acf769d83a
Use isupport informations to know the user modes when joining
...
Also remove the duplicate send_self_join methods, user only send_user_join
2014-01-04 01:59:36 +01:00
Florent Le Coz
a075517824
Basic isupport support
...
CHANMODES and PREFIX only
2014-01-04 01:59:36 +01:00
Florent Le Coz
43cc60e4a9
Handle nickname conflicts by sending the correct XMPP error presence
2014-01-04 01:59:35 +01:00
Florent Le Coz
e8e592d1ac
Remove disconnected IrcClients
2014-01-04 01:59:35 +01:00
Florent Le Coz
aa53276859
Keep a "connected" state in the SocketHandler class
2014-01-04 01:59:35 +01:00
Florent Le Coz
483e17020d
Be verbose about the connection status, and some errors
2014-01-04 01:59:35 +01:00
Florent Le Coz
9df757fc67
Handle topic changes
2014-01-04 01:59:35 +01:00
Florent Le Coz
b8ce9ed43d
Check that channels are joined before acting on objects in it
2014-01-04 01:59:34 +01:00
Florent Le Coz
3afb63a650
Shutdown cleanly on SIGINT
2014-01-04 01:59:14 +01:00
Florent Le Coz
df59a09163
Do not mismatch password and hostname in the config error help message
2013-12-24 14:04:12 +01:00
Florent Le Coz
983477084c
connect() returns a boolean
2013-12-24 14:03:40 +01:00
Florent Le Coz
2ecb637f0c
Read a variable number of bytes, 4096 by default
2013-12-23 17:07:43 +01:00
Florent Le Coz
e35472a6cb
Correctly send the part message to IRC
...
By fixing a namespace when looking for an XML element containing that message
2013-12-23 17:02:46 +01:00
Florent Le Coz
7d8ce3b563
Use XML-sanitized strings when serializing stanzas for the XMPP server
2013-12-15 00:34:30 +01:00
Florent Le Coz
3960e4d5af
Functions to provide xml-valid strings
...
By removing invalid chars, see http://www.w3.org/TR/xml/#charsets
2013-12-15 00:34:13 +01:00
Florent Le Coz
b29290f73a
Lowercase the chan names in two missing cases
2013-12-09 03:53:01 +01:00
Florent Le Coz
b11126a19d
Provide a JID for IRC users, and add a stringprep dependency for this
2013-12-08 20:14:12 +01:00
Florent Le Coz
cb718def0c
Put utils::tolower definition in its own cpp file
2013-12-08 18:02:24 +01:00
Florent Le Coz
e2117bcb0a
Enforce a simple limit of 400 bytes for IRC messages body
...
The limit for the whole message is 512 bytes, we limit the body to 400
(instead of doing a calculation based on the command name and the other
parameters), because it's simple, easy and that’s enough.
fixes #2416
2013-12-08 04:47:05 +01:00
Florent Le Coz
6fa548a194
Display all the MODE arguments in the message
2013-12-03 19:56:57 +01:00
Florent Le Coz
a4c845ab6c
Use the logger everywhere
2013-12-03 19:15:37 +01:00
Florent Le Coz
2662ed89e2
Add a logger class
2013-12-03 19:15:37 +01:00
Florent Le Coz
6bd176f15e
Fix a parenthesis ambiguity
2013-12-03 18:49:43 +01:00
Florent Le Coz
050cf1fd60
xml-escape the tail in an XmlNode
2013-12-02 13:15:51 +01:00
Florent Le Coz
d6832fbcc9
:3
2013-11-28 21:09:27 +01:00
Florent Le Coz
1151c26c36
Channel names are case insensitive
...
But some servers (epiknet for example) send channel names with an uppercase
2013-11-28 02:14:42 +01:00
Florent Le Coz
2921f53657
Print some stuff when ./test is running
2013-11-28 01:18:26 +01:00
Florent Le Coz
61ecaab400
Re-add support for /me messages from IRC
...
It was recently removed because it was handled in the old "convert irc
colors" code. It now is in the right place.
2013-11-28 01:18:26 +01:00
Florent Le Coz
e6f20d3c0f
Implement IRC format to xhtml-im conversion
...
The generated XML is very verbose because each IRC formatting tag makes us
close a <span/> element and reopen it with the new style applied. However,
this works quite well and is easy to implement.
2013-11-28 01:18:26 +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
Emmanuel Gil Peyrot
83219052c3
Fix JID parsing
2013-11-14 23:31:32 +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