summaryrefslogtreecommitdiff
path: root/src/irc/core
AgeCommit message (Collapse)Author
2016-10-22Rename SSL to TLS.Alexander Færøy
This patch changes the internal name of SSL to TLS. We also add -tls_* options to /CONNECT and /SERVER, but make sure that the -ssl_* versions of the commands continue to work like before.
2016-09-30Make the cap_complete field unsigned.LemonBoy
Fixes a problem where the field would end up as a negative number when exposed to the perl scripts. And move it near the other bit-packed fields so we take advantage of the packing.
2016-09-26Merge pull request #506 from kruton/sasl-400-byte-chunkailin-nemui
SASL: handle fragmentation
2016-08-29SASL: handle fragmentationKenny Root
The IRCv3 SASL extension says that AUTHENTICATION payloads of exactly 400 bytes in length indicate that the message is fragmented and will continue in a subsequent message. Handle the reassembly and splitting of these messages so that we are compliant with the specification.
2016-08-24Set the default STATUSMSG to @ instead of @+ if it's missingdequis
This fixes two issues: - IRCNet doesn't have STATUSMSG, but it supports +channels, and including + in the default value meant processing those incorrectly - The "bahamut hack", for old servers that support but don't advertise STATUSMSG, didn't work since ischannel_func doesn't use the default. The choice of @ intentionally leaves out support for other STATUSMSG (for example, AzzurraNet's bahamut 1.4 fork seemed to support + and % in any order, contradicting the comment in the code). I think this is a decent tradeoff, given how those servers are uncommon and relying on +# or %# is even less common than @#. Fixes #531
2016-06-14Merge pull request #422 from LemonBoy/misc-cleanupailin-nemui
Clean up misc.c
2016-06-13Use ; as separator instead of ,LemonBoy
2016-06-12Make rejoin_channels_mode of type CHOICELemonBoy
2016-06-05Clean up some GTimeVal jugglingLemonBoy
2016-06-05Replace strocpy with g_strlcpyLemonBoy
The only difference was that the former returned 1 if the buffer was overflown, but the return value was never checked.
2016-06-01Correct the name of the emitted signal.LemonBoy
There's a typo in 'sasl_fail', the signal that's emitted should be 'server sasl failure' and not 'server sasl fail'.
2016-03-29Revert "Removed the obsolete SQUERY and SERVLIST commands"ailin-nemui
This reverts commit 4beebe3238dda96efd4c3a0a6f6002ad5afc96e7.
2016-03-20Merge pull request #442 from LemonBoy/fix-435ailin-nemui
Do not assume any default value for statusmsg.
2016-03-20Use 0 as a sentinel value for sasl_timeoutLemonBoy
If sasl_timeout is never initialized with a valid timeout id then calling /disconnect on the server calls g_source_remove() with 0 as tag, causing an harmless error message to be printed. Beside that, the sasl_timeout field is defined as a unsigned int. We can use 0 as sentiel since g_timeout_add returns tags that are always greater than zero.
2016-03-19Make ischannel_func return false for empty stringsLemonBoy
2016-03-17Do not assume any default value for statusmsg.LemonBoy
If the server didn't send it then just skip the check, the old value it defaulted to was possibly overlapping with the CHANTYPES leading to an incorrect behaviour. Fixes #435.
2016-03-11Remove sasl timeout source when the server disconnectsdequis
2016-03-08Fix SASL EXTERNAL authenticationMantas Mikulėnas
The "AUTHENTICATE" command is always required – it's part of the IRCv3 SASL framing. RFC 4422 only documents the Base64 payload.
2016-01-24Duplicate the code paths for autocommands.LemonBoy
2016-01-14Change when the autocmds are sent.LemonBoy
As per #175 if a -botcmd is specified for a given channel without a -bots parameter then the command is sent right after joining the channel.
2016-01-08make /knockout use /unban to remove bansLukas Mai
/knockout uses /ban to set bans but calls ban_remove() directly to remove them. This commit makes it use /unban instead. This allows scripts that hook ban/unban to work automatically with /knockout.
2016-01-08irc/core/irc-commands.c: fix indentationLukas Mai
2015-11-26irc-cap: Don't send a space at the beginning of the CAP REQ parameterdequis
Turns out it confuses inspircd, making it reply a NAK with empty parameter. The rest is ACKed anyway. I've already whined at saberuk and there's a pending pull request over there fixing this issue. And, of course, this is cleaner.
2015-11-19Correctly alias 'channel' to '#channel'LemonBoy
Use the same approach used in 'irc_channels_join'. Remove 'irc_nick_strip' since it was unused.
2015-11-09Use the PARAM_FLAG_STRIP_TRAILING_WS flag wherever possible.LemonBoy
2015-10-28Preserve the sasl_ options across reconnects.LemonBoy
2015-10-03Merge pull request #314 from LemonBoy/sasl_sessiondx
Save the sasl state in the session
2015-10-02Set HOST_NAME_MAX to 255, if it's undefined.Alexander Færøy
Thanks to Jilles and dx. Fixes #309
2015-10-02Don't set the usermode field if blankLemonBoy
Fixes FS#919
2015-10-02Save the sasl state in the sessionLemonBoy
This is seemingly required to have irssi re-authenticate after a restart.
2015-09-26Merge pull request #304 from LemonBoy/sasl_user_optionsailin-nemui
Allow the user to set and modify the SASL parameters
2015-09-26Allow the user to set and modify the SASL parametersLemonBoy
The /NETWORK ADD command now is able to modify the SASL mechanism, the username and the password on a chatnet basis.
2015-09-23Add multi-prefix to list of capabilities to requestdequis
Turns out event_names_list() in irc-nicklist.c already handles this. event_who() just ignores it, which is probably a good idea since some of the irc servers I tested this with have a bug that results in sending multiple prefixes in the NAMES reply but not in the WHO one (they were forks of ircd-hybrid before 7.3.0) And NAMES always happens, anyway. WHO is omitted sometimes for huge channels.
2015-09-21Merge pull request #267 from kyak/masterailin-nemui
Add expandos for hostname
2015-09-20Merge pull request #278 from LemonBoy/sasldx
SASL support
2015-09-21Use formats instead of g_warningLemonBoy
Add some copyright headers here and there too.
2015-09-20More format warnings removed.Alexander Færøy
2015-09-20Fix formatting warnings.Alexander Færøy
2015-09-20Fix warning.Alexander Færøy
2015-09-19Merge remote-tracking branch 'origin' into saslLemonBoy
2015-09-19Add setting to configure rejoin on reconnect behaviourJari Matilainen
Closes #169
2015-09-11Don't handle 908 as a critical failureLemonBoy
"if the mechanism is unknown, 908 is optional, 904 (or equivalent error condition) is required"
2015-09-11Parse the error string received by the serverLemonBoy
So that in case of SASL failure the user sees a nice error message.
2015-09-11Consider the SASL handshake successful on 903LemonBoy
2015-09-11Handle event 906 and 908LemonBoy
2015-09-11Explicitly set the authorization id during the PLAIN handshakeLemonBoy
On error show the user the message sent by the server.
2015-09-11Replace spaces with tabsLemonBoy
2015-09-11Address all the points outlined in the first reviewLemonBoy
Replace G_SOURCE_REMOVE with FALSE for the compatibility sake. Zero the timeout id after g_source_remove and when exipred. Save the sasl_* options in sig_chatnet_saved().
2015-09-11SASL supportLemonBoy
The only supported methods are PLAIN and EXTERNAL, the latter is untested as of now. The code gets the values from the keys named sasl_{mechanism,username,password} specified for each chatnet.
2015-09-10Merge pull request #248 from LemonBoy/chantypesAlexander Færøy
Implement CHANTYPES support