1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00
Commit Graph

658 Commits

Author SHA1 Message Date
Alexander Færøy
2be7289085
Rename SSL to TLS.
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-10-22 20:36:50 +02:00
LemonBoy
3667fd9fd1 Make the cap_complete field unsigned.
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-30 19:30:43 +02:00
ailin-nemui
8d4d313cc9 Merge pull request #506 from kruton/sasl-400-byte-chunk
SASL: handle fragmentation
2016-09-26 16:43:33 +02:00
Kenny Root
60d9ec621f SASL: handle fragmentation
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-29 22:56:30 -07:00
dequis
3429c1a0a0 Set the default STATUSMSG to @ instead of @+ if it's missing
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-08-24 19:56:23 -03:00
ailin-nemui
fd371cc345 Merge pull request #422 from LemonBoy/misc-cleanup
Clean up misc.c
2016-06-14 12:35:30 +02:00
LemonBoy
439e21f127 Use ; as separator instead of , 2016-06-13 14:07:04 +02:00
LemonBoy
86c5e56ef4 Make rejoin_channels_mode of type CHOICE 2016-06-12 16:26:18 +02:00
LemonBoy
cc70e8c581 Clean up some GTimeVal juggling 2016-06-05 16:48:27 +02:00
LemonBoy
72712a0c62 Replace strocpy with g_strlcpy
The only difference was that the former returned 1 if the buffer was
overflown, but the return value was never checked.
2016-06-05 16:24:55 +02:00
LemonBoy
f1d0c8ff99 Correct the name of the emitted signal.
There's a typo in 'sasl_fail', the signal that's emitted should be
'server sasl failure' and not 'server sasl fail'.
2016-06-01 22:29:13 +02:00
ailin-nemui
ec4ecd844b Revert "Removed the obsolete SQUERY and SERVLIST commands"
This reverts commit 4beebe3238.
2016-03-29 22:41:01 +02:00
ailin-nemui
2ab2636713 Merge pull request #442 from LemonBoy/fix-435
Do not assume any default value for statusmsg.
2016-03-20 22:06:41 +01:00
LemonBoy
550fe6f010 Use 0 as a sentinel value for sasl_timeout
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-20 21:47:02 +01:00
LemonBoy
f31d37a852 Make ischannel_func return false for empty strings 2016-03-19 12:11:53 +01:00
LemonBoy
f6c2805b91 Do not assume any default value for statusmsg.
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-17 22:27:05 +01:00
dequis
e853392f43 Remove sasl timeout source when the server disconnects 2016-03-11 14:55:31 -03:00
Mantas Mikulėnas
4baefd2574 Fix SASL EXTERNAL authentication
The "AUTHENTICATE" command is always required – it's part of the IRCv3
SASL framing. RFC 4422 only documents the Base64 payload.
2016-03-08 23:13:03 +02:00
LemonBoy
eba160ca6d Duplicate the code paths for autocommands. 2016-01-24 23:02:40 +01:00
LemonBoy
2502080871 Change when the autocmds are sent.
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-14 23:54:42 +01:00
Lukas Mai
41088b6f65 make /knockout use /unban to remove bans
/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-08 19:37:29 +01:00
Lukas Mai
cf90b2122e irc/core/irc-commands.c: fix indentation 2016-01-08 18:52:59 +01:00
dequis
82ce1de5b0 irc-cap: Don't send a space at the beginning of the CAP REQ parameter
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-26 19:50:58 -03:00
LemonBoy
d7ef9c590f Correctly alias 'channel' to '#channel'
Use the same approach used in 'irc_channels_join'.
Remove 'irc_nick_strip' since it was unused.
2015-11-19 15:31:32 +01:00
LemonBoy
d4676c9855 Use the PARAM_FLAG_STRIP_TRAILING_WS flag wherever possible. 2015-11-09 23:02:41 +01:00
LemonBoy
8094e87cdf Preserve the sasl_ options across reconnects. 2015-10-28 21:56:35 +01:00
dx
15a40ea6d3 Merge pull request #314 from LemonBoy/sasl_session
Save the sasl state in the session
2015-10-03 22:15:17 -03:00
Alexander Færøy
da3f2f0d01
Set HOST_NAME_MAX to 255, if it's undefined.
Thanks to Jilles and dx.

Fixes #309
2015-10-02 19:55:29 +02:00
LemonBoy
cfff402fe6 Don't set the usermode field if blank
Fixes FS#919
2015-10-02 11:25:30 +02:00
LemonBoy
a475d57183 Save the sasl state in the session
This is seemingly required to have irssi re-authenticate after a
restart.
2015-10-02 10:52:13 +02:00
ailin-nemui
18989e76db Merge pull request #304 from LemonBoy/sasl_user_options
Allow the user to set and modify the SASL parameters
2015-09-26 19:07:54 +02:00
LemonBoy
1a2c479bc0 Allow the user to set and modify the SASL parameters
The /NETWORK ADD command now is able to modify the SASL mechanism, the
username and the password on a chatnet basis.
2015-09-26 18:53:10 +02:00
dequis
7ae7422939 Add multi-prefix to list of capabilities to request
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-23 03:17:29 -03:00
ailin-nemui
211e84c1e9 Merge pull request #267 from kyak/master
Add expandos for hostname
2015-09-21 18:47:09 +02:00
dx
0912a11050 Merge pull request #278 from LemonBoy/sasl
SASL support
2015-09-20 19:19:49 -03:00
LemonBoy
203c00938a Use formats instead of g_warning
Add some copyright headers here and there too.
2015-09-21 00:04:37 +02:00
Alexander Færøy
a44c4b82de
More format warnings removed. 2015-09-20 23:11:39 +02:00
Alexander Færøy
6c9dcffb5e
Fix formatting warnings. 2015-09-20 22:51:13 +02:00
Alexander Færøy
be977bf1b7
Fix warning. 2015-09-20 21:21:40 +02:00
LemonBoy
06040fb30b Merge remote-tracking branch 'origin' into sasl 2015-09-19 23:58:16 +02:00
Jari Matilainen
9586766d87 Add setting to configure rejoin on reconnect behaviour
Closes #169
2015-09-19 18:34:05 -03:00
LemonBoy
24d32c28ee Don't handle 908 as a critical failure
"if the mechanism is unknown, 908 is optional, 904 (or equivalent error condition) is required"
2015-09-11 23:21:33 +02:00
LemonBoy
49c4ea5fd9 Parse the error string received by the server
So that in case of SASL failure the user sees a nice error message.
2015-09-11 23:20:07 +02:00
LemonBoy
1f114d75c6 Consider the SASL handshake successful on 903 2015-09-11 23:17:46 +02:00
LemonBoy
55387dd93d Handle event 906 and 908 2015-09-11 22:23:38 +02:00
LemonBoy
6645d0d38d Explicitly set the authorization id during the PLAIN handshake
On error show the user the message sent by the server.
2015-09-11 22:09:47 +02:00
LemonBoy
171b67441d Replace spaces with tabs 2015-09-11 01:17:18 +02:00
LemonBoy
c90c7deac3 Address all the points outlined in the first review
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-11 01:07:43 +02:00
LemonBoy
b8d3301d34 SASL support
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-11 00:30:16 +02:00
Alexander Færøy
7b46dae182 Merge pull request #248 from LemonBoy/chantypes
Implement CHANTYPES support
2015-09-10 01:37:08 +02:00