From 97e9347ee704bdcd790002f2629cf6cea3e2bf40 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 7 Jun 2016 02:47:57 +0200 Subject: [PATCH 01/12] Merge pull request #485 from ailin-nemui/bdo826525 Do not crash on OPTCHAN when item has no server --- src/core/commands.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/commands.c b/src/core/commands.c index 88d1208c..607baf77 100644 --- a/src/core/commands.c +++ b/src/core/commands.c @@ -666,7 +666,7 @@ get_optional_channel(WI_ITEM_REC *active_item, char **data, int require_name) const char *ret; char *tmp, *origtmp, *channel; - if (active_item == NULL) { + if (active_item == NULL || active_item->server == NULL) { /* no active channel in window, channel required */ return cmd_get_param(data); } @@ -674,11 +674,13 @@ get_optional_channel(WI_ITEM_REC *active_item, char **data, int require_name) origtmp = tmp = g_strdup(*data); channel = cmd_get_param(&tmp); - if (g_strcmp0(channel, "*") == 0 && !require_name) { + if (g_strcmp0(channel, "*") == 0 && IS_CHANNEL(active_item) && + !require_name) { /* "*" means active channel */ cmd_get_param(data); ret = window_item_get_target(active_item); - } else if (!server_ischannel(active_item->server, channel)) { + } else if (IS_CHANNEL(active_item) && + !server_ischannel(active_item->server, channel)) { /* we don't have channel parameter - use active channel */ ret = window_item_get_target(active_item); } else { From 750e3249038409607b0a57d21e21612e546539ed Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Wed, 1 Jun 2016 22:56:26 +0200 Subject: [PATCH 02/12] Merge pull request #484 from LemonBoy/sasl-misc-adj Correct the name of the emitted signal. --- src/irc/core/sasl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/irc/core/sasl.c b/src/irc/core/sasl.c index b74b6a8c..f080ae59 100644 --- a/src/irc/core/sasl.c +++ b/src/irc/core/sasl.c @@ -71,7 +71,7 @@ static void sasl_fail(IRC_SERVER_REC *server, const char *data, const char *from params = event_get_params(data, 2, NULL, &error); - signal_emit("server sasl fail", 2, server, error); + signal_emit("server sasl failure", 2, server, error); /* Terminate the negotiation */ cap_finish_negotiation(server); From 31c0a9d7e8368e8cfa10356bd9dbc1f9024d9c70 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Sun, 4 Sep 2016 12:11:02 +0200 Subject: [PATCH 03/12] Merge pull request #533 from dequis/statusmess Set the default STATUSMSG to @ instead of @+ if it's missing --- src/fe-common/irc/fe-irc-channels.c | 9 +++------ src/irc/core/irc-servers.c | 6 ++++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/fe-common/irc/fe-irc-channels.c b/src/fe-common/irc/fe-irc-channels.c index a2737fc3..0ec30003 100644 --- a/src/fe-common/irc/fe-irc-channels.c +++ b/src/fe-common/irc/fe-irc-channels.c @@ -41,7 +41,7 @@ int fe_channel_is_opchannel(IRC_SERVER_REC *server, const char *target) statusmsg = g_hash_table_lookup(server->isupport, "statusmsg"); if (statusmsg == NULL) - statusmsg = "@+"; + statusmsg = "@"; return strchr(statusmsg, *target) != NULL; } @@ -61,12 +61,9 @@ const char *fe_channel_skip_prefix(IRC_SERVER_REC *server, const char *target) statusmsg = g_hash_table_lookup(server->isupport, "statusmsg"); /* Hack: for bahamut 1.4 which sends neither STATUSMSG nor - * WALLCHOPS in 005, accept @#chan and @+#chan (but not +#chan) */ - if (statusmsg == NULL && *target != '@') - return target; - + * WALLCHOPS in 005 */ if (statusmsg == NULL) - statusmsg = "@+"; + statusmsg = "@"; /* Strip the leading statusmsg prefixes */ while (strchr(statusmsg, *target) != NULL) { diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 1df95f70..f905a862 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -89,8 +89,10 @@ static int ischannel_func(SERVER_REC *server, const char *data) chantypes = "#&!+"; /* normal, local, secure, modeless */ statusmsg = g_hash_table_lookup(irc_server->isupport, "statusmsg"); - if (statusmsg != NULL) - data += strspn(data, statusmsg); + if (statusmsg == NULL) + statusmsg = "@"; + + data += strspn(data, statusmsg); /* strchr(3) considers the trailing NUL as part of the string, make sure * we didn't advance too much. */ From 3c29b4440841e867fe804ec5351884d90d9d8bcf Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Thu, 25 Aug 2016 04:24:07 +0200 Subject: [PATCH 04/12] Merge pull request #529 from ailin-nemui/issue500 fix nick->host == NULL crash --- src/fe-common/core/fe-messages.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c index 3240fd10..8ad83753 100644 --- a/src/fe-common/core/fe-messages.c +++ b/src/fe-common/core/fe-messages.c @@ -602,9 +602,6 @@ static void sig_nicklist_new(CHANNEL_REC *channel, NICK_REC *nick) char *nickhost, *p; int n; - if (nick->host == NULL) - return; - firstnick = g_hash_table_lookup(channel->nicks, nick->nick); if (firstnick->next == NULL) return; @@ -617,6 +614,9 @@ static void sig_nicklist_new(CHANNEL_REC *channel, NICK_REC *nick) return; /* nope, we have it */ } + if (nick->host == NULL) + return; + /* identical nick already exists, have to change it somehow.. */ p = strchr(nick->host, '@'); if (p == NULL) p = nick->host; else p++; From 6b212be112e33a536d08f31abf186a699ee8da51 Mon Sep 17 00:00:00 2001 From: dx Date: Sun, 17 Jul 2016 12:37:57 -0300 Subject: [PATCH 05/12] Merge pull request #518 from vague666/hilight_help MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wrong order in the arguments in /hilight example, -mask doesn't take … --- docs/help/in/hilight.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/help/in/hilight.in b/docs/help/in/hilight.in index fabbc2ea..cd91560b 100644 --- a/docs/help/in/hilight.in +++ b/docs/help/in/hilight.in @@ -31,7 +31,7 @@ /HILIGHT /HILIGHT mike /HILIGHT -regexp mi+ke+ - /HILIGHT -mask bob!*@*.irssi.org -color %%G + /HILIGHT -mask -color %%G bob!*@*.irssi.org /HILIGHT -full -color %%G -actcolor %%Y redbull %9References:%9 From e68817f82bc9dde71bb28975cee7ed70cc98ff30 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 12 Jul 2016 16:11:04 +0200 Subject: [PATCH 06/12] Merge pull request #515 from LemonBoy/signal-proto Correct the prototype for the 'message private' signal. --- docs/signals.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/signals.txt b/docs/signals.txt index 8b71fd95..5e03d901 100644 --- a/docs/signals.txt +++ b/docs/signals.txt @@ -260,7 +260,7 @@ fe-exec.c: fe-messages.c: "message public", SERVER_REC, char *msg, char *nick, char *address, char *target - "message private", SERVER_REC, char *msg, char *nick, char *address + "message private", SERVER_REC, char *msg, char *nick, char *address, char *target "message own_public", SERVER_REC, char *msg, char *target "message own_private", SERVER_REC, char *msg, char *target, char *orig_target "message join", SERVER_REC, char *channel, char *nick, char *address From 8cbf5f28f2028fd6fc58232c76f67ab574ecab11 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 29 Mar 2016 22:45:47 +0200 Subject: [PATCH 07/12] Merge pull request #461 from ailin-nemui/fix_squery Revert "Removed the obsolete SQUERY and SERVLIST commands" --- docs/help/in/list.in | 6 +++--- docs/help/in/servlist.in | 23 +++++++++++++++++++++++ docs/help/in/squery.in | 16 ++++++++++++++++ src/irc/core/irc-commands.c | 6 ++++++ 4 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 docs/help/in/servlist.in create mode 100644 docs/help/in/squery.in diff --git a/docs/help/in/list.in b/docs/help/in/list.in index 33f05e8b..b796eed0 100644 --- a/docs/help/in/list.in +++ b/docs/help/in/list.in @@ -25,10 +25,10 @@ %9Remarks:%9 Not all networks support server-side filtering and may provide a network - service instead; on IRCnet, you may use the ALIS service: + service or service bot instead; on IRCnet, you may use the List service: - /QUOTE SQUERY ALIS :HELP + /SQUERY List HELP /MSG ALIS HELP -%9See also:%9 QUOTE, STATS, WHOIS +%9See also:%9 STATS, SQUERY, WHOIS diff --git a/docs/help/in/servlist.in b/docs/help/in/servlist.in new file mode 100644 index 00000000..0a0d025f --- /dev/null +++ b/docs/help/in/servlist.in @@ -0,0 +1,23 @@ + +%9Syntax:%9 + +@SYNTAX:servlist@ + +%9Parameters:%9 + + limits the output to the services which names matches + the mask. + limits the output to the services of the specified type. + +%9Description:%9 + + List the network services currently present on the + IRC network. + +%9Examples:%9 + + /SERVLIST *@javairc.* + /SERVLIST * 0xD000 + +%9See also:%9 SQUERY + diff --git a/docs/help/in/squery.in b/docs/help/in/squery.in new file mode 100644 index 00000000..59ee8008 --- /dev/null +++ b/docs/help/in/squery.in @@ -0,0 +1,16 @@ + +%9Syntax:%9 + +@SYNTAX:squery@ + +%9Parameters:%9 + + - Service nickname or full hostmask of service to query. + - Message to send to the service. + +%9Description:%9 + + /SQUERY sends a query to the specified service. + +%9See also:%9 SERVLIST, LIST, MSG + diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c index 6baf2f6d..32ee8845 100644 --- a/src/irc/core/irc-commands.c +++ b/src/irc/core/irc-commands.c @@ -1018,11 +1018,15 @@ void irc_commands_init(void) command_bind_irc("trace", NULL, (SIGNAL_FUNC) command_self); /* SYNTAX: VERSION [|] */ command_bind_irc("version", NULL, (SIGNAL_FUNC) command_self); + /* SYNTAX: SERVLIST [ []] */ + command_bind_irc("servlist", NULL, (SIGNAL_FUNC) command_self); /* SYNTAX: SILENCE [[+|-]] SILENCE [] */ command_bind_irc("silence", NULL, (SIGNAL_FUNC) command_self); command_bind_irc("unsilence", NULL, (SIGNAL_FUNC) cmd_unsilence); command_bind_irc("sconnect", NULL, (SIGNAL_FUNC) cmd_sconnect); + /* SYNTAX: SQUERY [] */ + command_bind_irc("squery", NULL, (SIGNAL_FUNC) command_2self); /* SYNTAX: DIE */ command_bind_irc("die", NULL, (SIGNAL_FUNC) command_self); /* SYNTAX: HASH */ @@ -1091,9 +1095,11 @@ void irc_commands_deinit(void) command_unbind("time", (SIGNAL_FUNC) command_self); command_unbind("trace", (SIGNAL_FUNC) command_self); command_unbind("version", (SIGNAL_FUNC) command_self); + command_unbind("servlist", (SIGNAL_FUNC) command_self); command_unbind("silence", (SIGNAL_FUNC) command_self); command_unbind("unsilence", (SIGNAL_FUNC) cmd_unsilence); command_unbind("sconnect", (SIGNAL_FUNC) cmd_sconnect); + command_unbind("squery", (SIGNAL_FUNC) command_2self); command_unbind("die", (SIGNAL_FUNC) command_self); command_unbind("hash", (SIGNAL_FUNC) command_self); command_unbind("oper", (SIGNAL_FUNC) cmd_oper); From 2c5856d832c9cc7f2a995e9017b4436d752c68c3 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Thu, 7 Apr 2016 12:33:03 +0200 Subject: [PATCH 08/12] Merge pull request #467 from dequis/EAI_SYSTEM net_gethosterror: Handle EAI_SYSTEM ("System error") properly --- src/core/network.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/network.c b/src/core/network.c index 0751aa95..c3ad4e23 100644 --- a/src/core/network.c +++ b/src/core/network.c @@ -585,7 +585,11 @@ const char *net_gethosterror(int error) #ifdef HAVE_IPV6 g_return_val_if_fail(error != 0, NULL); - return gai_strerror(error); + if (error == EAI_SYSTEM) { + return strerror(errno); + } else { + return gai_strerror(error); + } #else switch (error) { case HOST_NOT_FOUND: From 7455ad51d43ad925a613ff90e3b6d3c866b2fe7b Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Sat, 30 Apr 2016 10:19:57 +0200 Subject: [PATCH 09/12] Merge pull request #477 from dennisschagt/master Correct error/typo "You"->"Your" in help message --- docs/help/in/away.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/help/in/away.in b/docs/help/in/away.in index e0cf3685..75bc46c4 100644 --- a/docs/help/in/away.in +++ b/docs/help/in/away.in @@ -8,8 +8,8 @@ -one: Marks yourself as away on the active server. -all: Marks yourself as away on all the servers you are connected to. - You away message; if no argument is given, your away status will be removed. - + Your away message; if no argument is given, your away status will be removed. + %9Description:%9 Marks yourself as 'away'; this method is used to inform people that you From 52fedeaf0229e27f9d86b72b23f16120c92c1fea Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Wed, 14 Sep 2016 13:34:39 +0200 Subject: [PATCH 10/12] Update NEWS for 0.8.20 --- NEWS | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/NEWS b/NEWS index 65aab5ed..265827b3 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,17 @@ +v0.8.20 2016-09-16 The Irssi team + - Correct the name of an emitted sasl signal (#484) + - Correct the prototype for the 'message private' signal (#515) + - Corrections in away and hilight help text (#477, #518) + - /squery and /servlist commands have been restored. + - Where Irssi would previously only report "System error" on connect, + it will now try harder to retrieve the system error message. + - Fixed issue with +channels not working properly (#533) + - Fixed crash in optchan when item has no server (#485) + - Fixed random remote crash in the nicklist handling (#529) + - Fixed remote crash due to incorrect bounds checking on + formats, reported by Gabriel Campana and Adrien Guinet from + Quarkslab. + v0.8.19 2016-03-23 The Irssi team - Fixed regression when joining and parting channels on IRCnet (#435) - Fixed SASL EXTERNAL (#432) From 9de7a9b3284b06631a47609a83e608cfe0541de1 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Wed, 14 Sep 2016 13:44:51 +0200 Subject: [PATCH 11/12] Merge branch 'quarkslab' --- src/fe-common/core/formats.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/fe-common/core/formats.c b/src/fe-common/core/formats.c index ccf48394..d9a51201 100644 --- a/src/fe-common/core/formats.c +++ b/src/fe-common/core/formats.c @@ -131,6 +131,8 @@ void unformat_24bit_color(char **ptr, int off, int *fgcolor, int *bgcolor, int * unsigned char rgbx[4]; unsigned int i; for (i = 0; i < 4; ++i) { + if ((*ptr)[i + off] == '\0') + return; rgbx[i] = (*ptr)[i + off]; } rgbx[3] -= 0x20; @@ -1357,6 +1359,9 @@ void format_send_to_gui(TEXT_DEST_REC *dest, const char *text) bgcolor = *ptr==(char)0xff ? -1 : *ptr-'0'; } } + if (*ptr == '\0') + break; + ptr++; break; case 6: From 13f4026ae0f0d5422f3163576d4c2eff8754176a Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Wed, 14 Sep 2016 13:55:20 +0200 Subject: [PATCH 12/12] tag as 0.8.20 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b25e7286..458c8aa9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(irssi, 0.8.19) +AC_INIT(irssi, 0.8.20) AC_CONFIG_SRCDIR([src]) AC_CONFIG_AUX_DIR(build-aux) AC_PREREQ(2.50)