From be5f917f07e6c4d4de643d307048281e87717a67 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Thu, 30 Jun 2022 23:25:35 +0200 Subject: [PATCH 01/11] Merge pull request #1393 from ailin-nemui/eval-help minor rendering fix in eval help (cherry picked from commit 0bf18beed75e0423c7848908ebc4ba6f39cc96c7) --- docs/help/in/eval.in | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/help/in/eval.in b/docs/help/in/eval.in index b0c904b4..c53c6248 100644 --- a/docs/help/in/eval.in +++ b/docs/help/in/eval.in @@ -10,18 +10,22 @@ %9Description:%9 Evaluates the given commands and executes them; you can use internal - variables and separate multiple commands by using the ';' character. - If the command contains a string with '$', '\' or ';' those characters + variables and separate multiple commands by using the `;' character. + If the command contains a string with `$', `\' or `;' those characters need to be escaped: - '$' -> '$$' - '\' -> '\\' (or even '\\\\', depending on where they are used) - ';' -> '\;' + + `$' -> `$$' + `\' -> `\\' (or even `\\\\', depending on where they are used) + `;' -> `\;' %9Examples:%9 /EVAL echo I am connected to ${S} on ${chatnet} as ${N} /EVAL echo My user privileges are +${usermode}; echo Let's party! - to print '1;2$3\4': /EVAL echo 1\;2$$3\\4 + + to print `1;2$3\4': + + /EVAL echo 1\;2$$3\\4 %9References:%9 From f51bc42429a7a8026a5205dc7f0fa0400564208d Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Sun, 12 Jun 2022 18:11:05 +0200 Subject: [PATCH 02/11] Merge pull request #1380 from ailin-nemui/scriptassist run syncscripts.sh (cherry picked from commit 68823eb6af68d941e94327170d6f5261568b6899) --- scripts/scriptassist.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/scriptassist.pl b/scripts/scriptassist.pl index cf02d57e..5cad3838 100644 --- a/scripts/scriptassist.pl +++ b/scripts/scriptassist.pl @@ -5,7 +5,7 @@ use strict; -our $VERSION = '2020042700'; +our $VERSION = '2022053100'; our %IRSSI = ( authors => 'Stefan \'tommie\' Tomanek', contact => 'stefan@pico.ruhr.de', @@ -30,7 +30,7 @@ $have_gpg = 0; eval "use GnuPG qw(:algo :trust);"; $have_gpg = 1 if not ($@); -my $irssi_version = qv(Irssi::parse_special('v$J') =~ s/-.*//r); +my $irssi_version = qv('v'.Irssi::parse_special('$J') =~ s/[^.\d].*//r); sub show_help { my $help = "scriptassist $VERSION From c01b35b062278258c5431955d1ed39bcf870cda9 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Fri, 19 Aug 2022 10:42:05 +0200 Subject: [PATCH 03/11] Merge pull request #1407 from madpilot78/Fix_libnv_detection Fix libnv detection on recent FreeBSD (cherry picked from commit f32d0ab51a5569ad908cefa3b033a7fb367240e7) --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 240c5344..0758aa63 100644 --- a/meson.build +++ b/meson.build @@ -492,7 +492,7 @@ have_capsicum = false if want_capsicum if cc.has_function('cap_enter', dependencies : cc.find_library('c')) libnv = cc.find_library('nv', required : require_capsicum) - nvlist_create_found = libnv.found() and cc.has_function('nvlist_create', dependencies : libnv) + nvlist_create_found = libnv.found() and cc.has_function('nvlist_create', dependencies : libnv, prefix : '#include ') if nvlist_create_found dep += libnv have_capsicum = true From 2c18da3cc60e6a8320138b7671d5660c3ae708dd Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 13 Sep 2022 09:51:43 +0200 Subject: [PATCH 04/11] Merge pull request #1411 from irssi/vague666-patch-1 /connect: Add help for -nocap (cherry picked from commit 38b18bd84da03f127e0ed51154923576bf22ae6f) --- docs/help/in/connect.in | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/help/in/connect.in b/docs/help/in/connect.in index d4375eec..4c6acc90 100644 --- a/docs/help/in/connect.in +++ b/docs/help/in/connect.in @@ -17,6 +17,7 @@ -tls_ciphers: TLS cipher suite preference lists. -tls_pinned_cert: Pinned x509 certificate fingerprint. -tls_pinned_pubkey: Pinned public key fingerprint. + -nocap: Disable CAPREQ during connect -noproxy: Ignores the global proxy configuration. -network: The network this connection belongs to. -host: The hostname you would like to connect from. From 23419e586699bf653d1ca81bd3fe45f9b8730344 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 13 Sep 2022 09:51:57 +0200 Subject: [PATCH 05/11] Merge pull request #1415 from irssi/vague666-patch-5 /server: Add help for -cap/-nocap (cherry picked from commit f76d41953f94bab519dec99c38d0b7fdb8bca1f4) --- docs/help/in/server.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/help/in/server.in b/docs/help/in/server.in index 84294af6..47b2d524 100644 --- a/docs/help/in/server.in +++ b/docs/help/in/server.in @@ -28,6 +28,8 @@ -tls_pinned_pubkey: Pinned public key fingerprint. -auto: Automatically connects to the server on startup. -noauto: Doesn't connect to the server on startup. + -cap: Enable CAPREQ for server. + -nocap: Disable CAPREQ for server. -network: The network the server belongs to. -host: The hostname you would like to connect from. -cmdspeed: Specifies the minimum amount of time, expressed in From 277923aaac5c6e65d5b9686ee3d9e4968858141a Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 13 Sep 2022 09:52:30 +0200 Subject: [PATCH 06/11] Merge pull request #1413 from irssi/vague666-patch-3 Update /server syntax line (cherry picked from commit 238d7cfd08d14115762d78b11c567c850133f72a) --- src/fe-common/irc/fe-irc-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fe-common/irc/fe-irc-server.c b/src/fe-common/irc/fe-irc-server.c index fbd70404..4aad7ee0 100644 --- a/src/fe-common/irc/fe-irc-server.c +++ b/src/fe-common/irc/fe-irc-server.c @@ -51,7 +51,7 @@ const char *get_visible_target(IRC_SERVER_REC *server, const char *target) return target; } -/* SYNTAX: SERVER ADD|MODIFY [-4 | -6] [-tls_cert ] [-tls_pkey ] +/* SYNTAX: SERVER ADD|MODIFY [-4 | -6] [-cap | -nocap] [-tls_cert ] [-tls_pkey ] [-tls_pass ] [-tls_verify] [-tls_cafile ] [-tls_capath ] [-tls_ciphers ] [-tls | -notls] [-starttls | -nostarttls | -disallow_starttls | -nodisallow_starttls] From 26f9750ad174a2cfd228f5498dd0f35b2e6e6df6 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Wed, 14 Sep 2022 09:24:35 +0200 Subject: [PATCH 07/11] Merge pull request #1414 from irssi/vague666-patch-4 Add -nocap to /connect and /server connect syntax (cherry picked from commit 55913ade1350a4c1087b0238ac863e0bab081fd7) --- src/core/chat-commands.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/core/chat-commands.c b/src/core/chat-commands.c index dd8dbe75..a88a27ab 100644 --- a/src/core/chat-commands.c +++ b/src/core/chat-commands.c @@ -114,8 +114,8 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr, [-tls_verify] [-tls_cafile ] [-tls_capath ] [-tls_ciphers ] [-tls_pinned_cert ] [-tls_pinned_pubkey ] [-!] [-noautosendcmd] [-tls | -notls] - [-starttls | -disallow_starttls] [-noproxy] [-network ] - [-host ] [-rawlog ] + [-nocap] [-starttls | -disallow_starttls] [-noproxy] + [-network ] [-host ] [-rawlog ]
| [ [ []]] */ /* NOTE: -network replaces the old -ircnet flag. */ static void cmd_connect(const char *data) @@ -211,14 +211,14 @@ static void cmd_server(const char *data, SERVER_REC *server, WI_ITEM_REC *item) command_runsub("server", data, server, item); } -/* SYNTAX: SERVER CONNECT [-4 | -6] [-tls] [-tls_cert ] [-tls_pkey ] - [-tls_pass ] [-tls_verify] [-tls_cafile ] - [-tls_capath ] - [-tls_ciphers ] [-tls_pinned_cert ] [-tls_pinned_pubkey ] - [-!] [-noautosendcmd] - [-noproxy] [-network ] [-host ] - [-rawlog ] - [+]
| [ [ []]] */ +/* SYNTAX: SERVER CONNECT [-4 | -6] [-tls] [-tls_cert ] [-tls_pkey ] + [-tls_pass ] [-tls_verify] [-tls_cafile ] + [-tls_capath ] [-tls_ciphers ] + [-tls_pinned_cert ] [-tls_pinned_pubkey ] + [-!] [-noautosendcmd] [-nocap] + [-noproxy] [-network ] [-host ] + [-rawlog ] + [+]
| [ [ []]] */ /* NOTE: -network replaces the old -ircnet flag. */ static void cmd_server_connect(const char *data, SERVER_REC *server) { From 93a94308bd8fcc871291afb94026640f6e28a08e Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Sat, 15 Oct 2022 08:52:20 +0200 Subject: [PATCH 08/11] Merge pull request #1417 from ailin-nemui/loop do not freeze on alt+left/right (cherry picked from commit 0c97433c7c41e50744da1c2ceaf19131e96fdf18) --- src/fe-text/mainwindows.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fe-text/mainwindows.c b/src/fe-text/mainwindows.c index fae7ced8..26b94248 100644 --- a/src/fe-text/mainwindows.c +++ b/src/fe-text/mainwindows.c @@ -1629,6 +1629,7 @@ static int window_refnum_left(int refnum, int wrap) { MAIN_WINDOW_REC *find_sticky; WINDOW_REC *window; + int start_refnum = refnum; window = window_find_refnum(refnum); g_return_val_if_fail(window != NULL, -1); @@ -1638,7 +1639,7 @@ static int window_refnum_left(int refnum, int wrap) do { refnum = window_refnum_prev(refnum, wrap); - if (refnum < 0) + if (refnum < 0 || refnum == start_refnum) break; window = window_find_refnum(refnum); @@ -1651,6 +1652,7 @@ static int window_refnum_right(int refnum, int wrap) { MAIN_WINDOW_REC *find_sticky; WINDOW_REC *window; + int start_refnum = refnum; window = window_find_refnum(refnum); g_return_val_if_fail(window != NULL, -1); @@ -1660,7 +1662,7 @@ static int window_refnum_right(int refnum, int wrap) do { refnum = window_refnum_next(refnum, wrap); - if (refnum < 0) + if (refnum < 0 || refnum == start_refnum) break; window = window_find_refnum(refnum); From 9a95edc69a4a20e5f215c2f887022ea7beacc1c7 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Sat, 15 Oct 2022 08:52:32 +0200 Subject: [PATCH 09/11] Merge pull request #1419 from ailin-nemui/init-irc-funcs move irc server functions to object creation time (cherry picked from commit a661e2fb35d4683871a374805daf8a20935f313f) --- src/irc/core/irc-servers.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 92c9d5f1..29f63c21 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -79,11 +79,11 @@ static int ischannel_func(SERVER_REC *server, const char *data) if (*data == '\0') return FALSE; - chantypes = g_hash_table_lookup(irc_server->isupport, "chantypes"); + chantypes = g_hash_table_lookup(irc_server->isupport, "CHANTYPES"); if (chantypes == NULL) chantypes = "#&!+"; /* normal, local, secure, modeless */ - statusmsg = g_hash_table_lookup(irc_server->isupport, "statusmsg"); + statusmsg = g_hash_table_lookup(irc_server->isupport, "STATUSMSG"); if (statusmsg == NULL && strchr(chantypes, '@') == NULL) statusmsg = "@"; @@ -296,11 +296,12 @@ static void server_init_1(IRC_SERVER_REC *server) irc_cap_toggle(server, CAP_STARTTLS, TRUE); } - server->isupport = g_hash_table_new((GHashFunc) i_istr_hash, (GCompareFunc) i_istr_equal); - /* set the standards */ - g_hash_table_insert(server->isupport, g_strdup("CHANMODES"), g_strdup("beI,k,l,imnpst")); - g_hash_table_insert(server->isupport, g_strdup("PREFIX"), g_strdup("(ohv)@%+")); + if (!g_hash_table_contains(server->isupport, "CHANMODES")) + g_hash_table_insert(server->isupport, g_strdup("CHANMODES"), + g_strdup("beI,k,l,imnpst")); + if (!g_hash_table_contains(server->isupport, "PREFIX")) + g_hash_table_insert(server->isupport, g_strdup("PREFIX"), g_strdup("(ohv)@%+")); server->cmdcount = 0; @@ -466,7 +467,16 @@ SERVER_REC *irc_server_init_connect(SERVER_CONNECT_REC *conn) modes_server_init(server); - server_connect_init((SERVER_REC *) server); + server->isupport = g_hash_table_new((GHashFunc) i_istr_hash, (GCompareFunc) i_istr_equal); + + server->isnickflag = isnickflag_func; + server->ischannel = ischannel_func; + server->split_message = split_message; + server->send_message = send_message; + server->query_find_func = (QUERY_REC * (*) (SERVER_REC *, const char *) ) irc_query_find; + server->nick_comp_func = irc_nickcmp_rfc1459; + + server_connect_init((SERVER_REC *) server); return (SERVER_REC *) server; } @@ -556,14 +566,6 @@ static void sig_connected(IRC_SERVER_REC *server) if (!IS_IRC_SERVER(server)) return; - server->isnickflag = isnickflag_func; - server->ischannel = ischannel_func; - server->split_message = split_message; - server->send_message = send_message; - server->query_find_func = - (QUERY_REC *(*)(SERVER_REC *, const char *)) irc_query_find; - server->nick_comp_func = irc_nickcmp_rfc1459; - server->splits = g_hash_table_new((GHashFunc) i_istr_hash, (GCompareFunc) i_istr_equal); if (!server->session_reconnect) From f9f6341c20d9e12241d357058a469cb82520dcb9 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Sat, 15 Oct 2022 08:52:40 +0200 Subject: [PATCH 10/11] Merge pull request #1420 from ailin-nemui/starttls-config enable saving of -disallow_starttls (cherry picked from commit afba1480562bba77b127322eb55a3a768a1e98b4) --- src/irc/core/irc-servers-setup.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/irc/core/irc-servers-setup.c b/src/irc/core/irc-servers-setup.c index e9e38504..c1603a48 100644 --- a/src/irc/core/irc-servers-setup.c +++ b/src/irc/core/irc-servers-setup.c @@ -220,9 +220,11 @@ static void sig_server_setup_saved(IRC_SERVER_SETUP_REC *rec, iconfig_node_set_int(node, "cmd_queue_speed", rec->cmd_queue_speed); if (rec->max_query_chans > 0) iconfig_node_set_int(node, "max_query_chans", rec->max_query_chans); - if (rec->starttls != STARTTLS_NOTSET) - iconfig_node_set_bool(node, "starttls", rec->starttls); - else + if (rec->starttls == STARTTLS_DISALLOW) + iconfig_node_set_bool(node, "starttls", FALSE); + else if (rec->starttls == STARTTLS_ENABLED) + iconfig_node_set_bool(node, "starttls", TRUE); + else if (rec->starttls == STARTTLS_NOTSET) iconfig_node_set_str(node, "starttls", NULL); if (rec->no_cap) iconfig_node_set_bool(node, "no_cap", TRUE); From c99c8b444da5b2a2ff53e86de02e924e3b728993 Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Sat, 29 Oct 2022 12:13:46 +0200 Subject: [PATCH 11/11] tag as 1.4.3 --- NEWS | 9 +++++++++ configure.ac | 2 +- meson.build | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 97c57e44..06960d6e 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,12 @@ +v1.4.3 2022-10-31 The Irssi team + - Fix freeze on Alt+arrows (#1416, #1417) + - Fix crash on /upgrade (#1399, #1419) + - Fix saving of -disallow_starttls (#1401, #1420) + - Fix libnv detection on FreeBSD (freebsd#265397, #1407). By + Guido Falsi and Kristof Provost + - Minor help and script fixes (#1380, #1393, #1411, #1413, + #1414, #1415) + v1.4.2 2022-07-17 The Irssi team * Add irssimoduledir to irssi-1.pc in the Meson build (#1383, #1378) diff --git a/configure.ac b/configure.ac index d8969cc2..e67c5b25 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(irssi, 1.4.2) +AC_INIT(irssi, 1.4.3) AC_CONFIG_SRCDIR([src]) AC_CONFIG_AUX_DIR(build-aux) AC_PREREQ(2.50) diff --git a/meson.build b/meson.build index 0758aa63..5038b752 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('irssi', 'c', - version : '1.4.2', + version : '1.4.3', meson_version : '>=0.49', default_options : ['warning_level=1'])