1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 22:24:47 +02:00

Compare commits

...

14 Commits

Author SHA1 Message Date
Sébastien Helleu b06edae3e3 Version 4.0.1 2023-06-30 21:18:01 +02:00
Sébastien Helleu 7d78be3a1b guile: fix crash on quit with Guile < 3 (closes #1965) 2023-06-27 21:44:54 +02:00
Sébastien Helleu 1107205059 core: update ChangeLog 2023-06-27 21:28:46 +02:00
Trygve Aaberge bd9978e467 core: check for newline characters in string_is_whitespace_char
This fixes a bug where if you had multiple lines in the input and
pressed ctrl-w when the cursor was after the first word of any line but
the first, it would delete both the word before the cursor and the last
word on the preceding line.
2023-06-27 21:26:47 +02:00
Sébastien Helleu b4d999010a api: do not convert option name to lower case in API functions config_set_plugin and config_set_desc_plugin 2023-06-27 12:58:51 +02:00
Sébastien Helleu 9939f939aa irc: sent "QUIT" message to servers connected with TLS on /upgrade 2023-06-26 22:08:22 +02:00
Sébastien Helleu 929d6fd452 core: fix level of section title in release notes 2023-06-26 21:23:25 +02:00
Sébastien Helleu db117f34dd core: display actual key name and command with key Alt+k
Key Alt+K (upper K) is removed as well as commands `/input grab_raw_key` and
`/input grab_raw_key_command`.
2023-06-26 20:40:11 +02:00
Sébastien Helleu f546796b49 irc: reply to a CTCP request sent to self nick (closes #1966) 2023-06-25 22:06:52 +02:00
Sébastien Helleu dd3277adbb core: add missing space in French translation 2023-06-25 19:14:48 +02:00
Sébastien Helleu cb7647a3ea core: force key "return" to command "/input return" when migrating legacy keys 2023-06-25 19:14:15 +02:00
Sébastien Helleu 21292f7464 core: fix format in Czech translation 2023-06-25 16:12:35 +02:00
Sébastien Helleu 3c433b5106 core: add option weechat.color.status_name_insecure in ChangeLog and release notes 2023-06-25 15:17:40 +02:00
Sébastien Helleu b578a0a4b9 Version 4.0.1-dev 2023-06-25 15:12:34 +02:00
21 changed files with 196 additions and 74 deletions
+14
View File
@@ -10,6 +10,19 @@ This document lists all the changes for each version. +
For a list of important changes that require manual actions, please look at release notes.
[[v4.0.1]]
== Version 4.0.1 (2023-06-30)
Bug fixes::
* core: force key "return" to command "/input return" when migrating legacy keys
* core: display actual key name and command with key kbd:[Alt+k], remove key kbd:[Alt+K] (grab raw key) and associated commands `/input grab_raw_key` and `/input grab_raw_key_command`
* core: check for newline characters in string_is_whitespace_char (issue #1968)
* api: do not convert option name to lower case in API functions config_set_plugin and config_set_desc_plugin
* guile: fix crash on quit with Guile < 3 (issue #1965)
* irc: reply to a CTCP request sent to self nick (issue #1966)
* irc: sent "QUIT" message to servers connected with TLS on `/upgrade`
[[v4.0.0]]
== Version 4.0.0 (2023-06-24)
@@ -33,6 +46,7 @@ New features::
* core: add access to hashtable properties in evaluation of expressions (issue #1888)
* core: display similar command names when a command is unknown (issue #1877)
* core: rename option weechat.color.status_name_ssl to weechat.color.status_name_tls
* core: add option weechat.color.status_name_insecure to display buffer name with a specific color when not connected with TLS to the server
* core, plugins: make many identifiers case sensitive (issue #1872, issue #398, bug #32213)
* core: add item "mouse_status" in default status bar, change default color to lightgreen
* core, trigger: add options weechat.color.chat_status_disabled and weechat.color.chat_status_enabled, remove options trigger.color.trigger and trigger.color.trigger_disabled, add enabled/disabled status color in output of `/filter list` (issue #1820)
+24
View File
@@ -11,6 +11,26 @@ It is recommended to read it when upgrading to a new stable version. +
For a complete list of changes, please look at ChangeLog.
[[v4.0.1]]
== Version 4.0.1 (2023-06-30)
[[v4.0.1_config_set_plugin]]
=== Functions config_set_plugin and config_set_desc_plugin
The functions link:https://weechat.org/doc/weechat/plugin/#_config_set_plugin[config_set_plugin]
and link:https://weechat.org/doc/weechat/plugin/#_config_set_desc_plugin[config_set_desc_plugin]
are not converting any more the option name to lower case because since version 4.0.0,
the name of options is case sensitive.
[[v4.0.1_grab_raw_key]]
=== Grab raw key and command
Key kbd:[Alt+K] (upper case) has been removed, as well as commands
`/input grab_raw_key` and `/input grab_raw_key_command`.
Now the key kbd:[Alt+k] displays the actual key name and command, possibly
raw key.
[[v4.0.0]]
== Version 4.0.0 (2023-06-24)
@@ -182,6 +202,10 @@ Alias converted to lower case: "CLOSE" => "close"
[[v4.0.0_tls]]
=== TLS options and connections
Option `weechat.color.status_name_insecure` has been added, the buffer name
is now displayed with color `lightmagenta` by default if the connection with
the server is *NOT* made with TLS.
Options, commands and documentation have been updated to "TLS" instead of "SSL":
* core option:
+2 -2
View File
@@ -22,7 +22,7 @@ msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"PO-Revision-Date: 2023-06-25 00:48+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: cs\n"
@@ -54,7 +54,7 @@ msgstr ""
#, c-format
msgid "End of command '%s', timeout reached (%.1fs)"
msgstr "Konec příkazu '%s', vypršel časový limit (%.lfs)"
msgstr "Konec příkazu '%s', vypršel časový limit (%.1fs)"
#, c-format
msgid "System clock skew detected (%+ld seconds), reinitializing all timers"
+2 -2
View File
@@ -22,7 +22,7 @@ msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"PO-Revision-Date: 2023-06-17 11:46+0200\n"
"PO-Revision-Date: 2023-06-25 19:12+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -3932,7 +3932,7 @@ msgstr "Ancienne touche convertie : \"%s\" => \"%s\""
#, c-format
msgid "Command converted for key \"%s\": \"%s\" => \"%s\""
msgstr "Commande convertie pour la touche\"%s\" : \"%s\" => \"%s\""
msgstr "Commande convertie pour la touche \"%s\" : \"%s\" => \"%s\""
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr "niveau de debug pour l'extension (\"core\" pour le cœur de WeeChat)"
+1 -17
View File
@@ -3534,28 +3534,12 @@ COMMAND_CALLBACK(input)
else if (string_strcmp (argv[1], "grab_key") == 0)
{
gui_input_grab_key (buffer,
0, /* raw_key */
0, /* command */
(argc > 2) ? argv[2] : NULL);
}
else if (string_strcmp (argv[1], "grab_raw_key") == 0)
{
gui_input_grab_key (buffer,
1, /* raw_key */
0, /* command */
(argc > 2) ? argv[2] : NULL);
}
else if (string_strcmp (argv[1], "grab_key_command") == 0)
{
gui_input_grab_key (buffer,
0, /* raw_key */
1, /* command */
(argc > 2) ? argv[2] : NULL);
}
else if (string_strcmp (argv[1], "grab_raw_key_command") == 0)
{
gui_input_grab_key (buffer,
1, /* raw_key */
1, /* command */
(argc > 2) ? argv[2] : NULL);
}
@@ -8433,7 +8417,7 @@ command_init ()
"move_next_word || move_previous_line || move_next_line || "
"history_previous || history_next || history_global_previous || "
"history_global_next || "
"grab_key || grab_raw_key || grab_raw_key_command || grab_key_command || "
"grab_key || grab_key_command || "
"grab_mouse || grab_mouse_area || "
"insert || send",
&command_input, NULL, NULL);
+12
View File
@@ -1612,6 +1612,18 @@ config_weechat_update_cb (const void *pointer, void *data,
ptr_option, new_option);
hashtable_set (data_read, "option", new_option);
changes++;
if (ptr_section
&& (strcmp (ptr_section, "key") == 0)
&& (strcmp (new_option, "return") == 0)
&& (!ptr_value
|| (strcmp (ptr_value, "/input return") != 0)))
{
gui_chat_printf (
NULL,
_("Command converted for key \"%s\": \"%s\" => \"%s\""),
"return", ptr_value, "/input return");
hashtable_set (data_read, "value", "/input return");
}
}
free (new_option);
}
+6 -2
View File
@@ -1312,7 +1312,7 @@ string_convert_escaped_chars (const char *string)
}
/*
* Checks if first char of string is a whitespace (space or tab).
* Checks if first char of string is a whitespace (space, tab, newline or carriage return).
*
* Returns:
* 1: first char is whitespace
@@ -1322,7 +1322,11 @@ string_convert_escaped_chars (const char *string)
int
string_is_whitespace_char (const char *string)
{
return (string && ((string[0] == ' ') || string[0] == '\t')) ? 1 : 0;
return (string && (
(string[0] == ' ')
|| (string[0] == '\t')
|| (string[0] == '\n')
|| (string[0] == '\r'))) ? 1 : 0;
}
/*
-1
View File
@@ -134,7 +134,6 @@ gui_key_default_bindings (int context, int create_option)
BIND("meta-h,meta-r", "/hotlist restore");
BIND("meta-h,meta-R", "/hotlist restore -all");
BIND("meta-k", "/input grab_key_command");
BIND("meta-K", "/input grab_raw_key_command");
BIND("meta-s", "/mute spell toggle");
BIND("meta-u", "/window scroll_unread");
BIND("ctrl-s,ctrl-u", "/allbuf /buffer set unread");
+2 -3
View File
@@ -1729,11 +1729,10 @@ gui_input_history_global_next (struct t_gui_buffer *buffer)
*/
void
gui_input_grab_key (struct t_gui_buffer *buffer, int raw_key, int command,
const char *delay)
gui_input_grab_key (struct t_gui_buffer *buffer, int command, const char *delay)
{
if (buffer->input)
gui_key_grab_init (raw_key, command, delay);
gui_key_grab_init (command, delay);
}
/*
+2 -2
View File
@@ -78,8 +78,8 @@ extern void gui_input_history_local_previous (struct t_gui_buffer *buffer);
extern void gui_input_history_local_next (struct t_gui_buffer *buffer);
extern void gui_input_history_global_previous (struct t_gui_buffer *buffer);
extern void gui_input_history_global_next (struct t_gui_buffer *buffer);
extern void gui_input_grab_key (struct t_gui_buffer *buffer, int raw_key,
int command, const char *delay);
extern void gui_input_grab_key (struct t_gui_buffer *buffer, int command,
const char *delay);
extern void gui_input_grab_mouse (struct t_gui_buffer *buffer, int area);
extern void gui_input_insert (struct t_gui_buffer *buffer, const char *args);
extern void gui_input_undo (struct t_gui_buffer *buffer);
+15 -18
View File
@@ -87,7 +87,6 @@ int gui_key_verbose = 0; /* 1 to see some messages */
char gui_key_combo[1024]; /* buffer used for combos */
int gui_key_grab = 0; /* 1 if grab mode enabled (alt-k) */
int gui_key_grab_raw = 0; /* grab raw key code? */
int gui_key_grab_count = 0; /* number of keys pressed in grab mode */
int gui_key_grab_command = 0; /* grab command bound to key? */
int gui_key_grab_delay = 0; /* delay for grab (default is 500) */
@@ -185,13 +184,12 @@ gui_key_get_current_context ()
*/
void
gui_key_grab_init (int grab_raw_key, int grab_command, const char *delay)
gui_key_grab_init (int grab_command, const char *delay)
{
long milliseconds;
char *error;
gui_key_grab = 1;
gui_key_grab_raw = grab_raw_key;
gui_key_grab_count = 0;
gui_key_grab_command = grab_command;
@@ -217,8 +215,7 @@ int
gui_key_grab_end_timer_cb (const void *pointer, void *data, int remaining_calls)
{
char *key_name, *key_name_alias, *key_utf8;
const char *ptr_key_name;
struct t_gui_key *ptr_key;
struct t_gui_key *ptr_key_raw, *ptr_key;
int rc;
/* make C compiler happy */
@@ -264,23 +261,23 @@ gui_key_grab_end_timer_cb (const void *pointer, void *data, int remaining_calls)
}
}
ptr_key_name = (gui_key_grab_raw) ? key_name : key_name_alias;
/* add expanded key to input buffer */
if (gui_current_window->buffer->input)
{
gui_input_insert_string (gui_current_window->buffer, ptr_key_name);
if (gui_key_grab_command)
ptr_key_raw = gui_key_search (gui_keys[GUI_KEY_CONTEXT_DEFAULT],
key_name);
ptr_key = gui_key_search (gui_keys[GUI_KEY_CONTEXT_DEFAULT],
key_name_alias);
gui_input_insert_string (gui_current_window->buffer,
(ptr_key_raw) ? key_name : key_name_alias);
/* add command bound to key (if found) */
if (gui_key_grab_command && (ptr_key_raw || ptr_key))
{
/* add command bound to key (if found) */
ptr_key = gui_key_search (gui_keys[GUI_KEY_CONTEXT_DEFAULT],
ptr_key_name);
if (ptr_key)
{
gui_input_insert_string (gui_current_window->buffer, " ");
gui_input_insert_string (gui_current_window->buffer,
ptr_key->command);
}
gui_input_insert_string (gui_current_window->buffer, " ");
gui_input_insert_string (
gui_current_window->buffer,
(ptr_key_raw) ?
ptr_key_raw->command : ptr_key->command);
}
gui_input_text_changed_modifier_and_signal (
gui_current_window->buffer,
+1 -2
View File
@@ -90,8 +90,7 @@ extern time_t gui_key_last_activity_time;
extern void gui_key_init ();
extern int gui_key_search_context (const char *context);
extern void gui_key_grab_init (int grab_raw_key, int grab_command,
const char *delay);
extern void gui_key_grab_init (int grab_command, const char *delay);
extern int gui_key_expand (const char *key,
char **key_name, char **key_name_alias);
extern char *gui_key_legacy_to_alias (const char *key);
+9
View File
@@ -1289,7 +1289,16 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
scm_install_gmp_memory_functions = 0;
#endif /* defined(HAVE_GUILE_GMP_MEMORY_FUNCTIONS) && (SCM_MAJOR_VERSION < 3 || (SCM_MAJOR_VERSION == 3 && SCM_MINOR_VERSION == 0 && SCM_MICRO_VERSION < 8)) */
#if defined(__MACH__) || SCM_MAJOR_VERSION < 3
/*
* on GNU/Hurd or if using Guile < 3, use scm_with_guile() instead of
* scm_init_guile() to prevent crash on exit
*/
scm_with_guile (&weechat_guile_init, NULL);
#else
/* any other OS (not GNU/Hurd) or Guile >= 3.x */
scm_init_guile ();
#endif
guile_module_weechat = scm_c_define_module ("weechat",
&weechat_guile_api_module_init,
+35 -4
View File
@@ -2454,6 +2454,8 @@ IRC_PROTOCOL_CALLBACK(notice)
struct t_irc_channel *ptr_channel;
struct t_irc_nick *ptr_nick;
int notify_private, is_channel, is_channel_orig, nick_is_me, display_host;
int cap_echo_message, msg_already_received;
time_t time_now;
struct t_gui_buffer *ptr_buffer;
IRC_PROTOCOL_MIN_PARAMS(2);
@@ -2479,8 +2481,23 @@ IRC_PROTOCOL_CALLBACK(notice)
if (nick && (pos_args[0] == '\01'))
{
irc_ctcp_display_reply_from_nick (server, date, tags, command, nick,
address, pos_args);
cap_echo_message = weechat_hashtable_has_key (server->cap_list,
"echo-message");
msg_already_received = weechat_hashtable_has_key (
server->echo_msg_recv, irc_message);
if (!msg_already_received && cap_echo_message)
{
time_now = time (NULL);
weechat_hashtable_set (server->echo_msg_recv,
irc_message, &time_now);
}
if (!cap_echo_message || !msg_already_received)
{
irc_ctcp_display_reply_from_nick (server, date, tags, command, nick,
address, pos_args);
}
if (msg_already_received)
weechat_hashtable_remove (server->echo_msg_recv, irc_message);
}
else
{
@@ -3024,7 +3041,9 @@ IRC_PROTOCOL_CALLBACK(privmsg)
{
char *msg_args, *msg_args2, str_tags[1024], *str_color, *color;
const char *pos_target, *remote_nick, *pv_tags;
int status_msg, is_channel, nick_is_me;
int status_msg, is_channel, nick_is_me, cap_echo_message;
int msg_already_received;
time_t time_now;
struct t_irc_channel *ptr_channel;
struct t_irc_nick *ptr_nick;
@@ -3175,7 +3194,17 @@ IRC_PROTOCOL_CALLBACK(privmsg)
/* CTCP to user */
if (msg_args[0] == '\01')
{
if (nick_is_me)
cap_echo_message = weechat_hashtable_has_key (server->cap_list,
"echo-message");
msg_already_received = weechat_hashtable_has_key (
server->echo_msg_recv, irc_message);
if (!msg_already_received && cap_echo_message)
{
time_now = time (NULL);
weechat_hashtable_set (server->echo_msg_recv,
irc_message, &time_now);
}
if (nick_is_me && cap_echo_message && !msg_already_received)
{
irc_protocol_privmsg_display_ctcp_send (
server, remote_nick, address, msg_args);
@@ -3185,6 +3214,8 @@ IRC_PROTOCOL_CALLBACK(privmsg)
irc_ctcp_recv (server, date, tags, command, NULL, params[0],
address, nick, remote_nick, msg_args, irc_message);
}
if (msg_already_received)
weechat_hashtable_remove (server->echo_msg_recv, irc_message);
goto end;
}
+33
View File
@@ -1768,6 +1768,11 @@ irc_server_alloc (const char *name)
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_TIME,
NULL, NULL);
new_server->echo_msg_recv = weechat_hashtable_new (
32,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_TIME,
NULL, NULL);
new_server->batches = NULL;
new_server->last_batch = NULL;
new_server->buffer = NULL;
@@ -2254,6 +2259,7 @@ irc_server_free_data (struct t_irc_server *server)
weechat_hashtable_free (server->join_manual);
weechat_hashtable_free (server->join_channel_key);
weechat_hashtable_free (server->join_noswitch);
weechat_hashtable_free (server->echo_msg_recv);
/* free server data */
for (i = 0; i < IRC_SERVER_NUM_OPTIONS; i++)
@@ -3914,6 +3920,23 @@ irc_server_check_join_smart_filtered_cb (void *data,
}
}
/*
* Callback called for each message received with echo-message: deletes old
* messages in the hashtable.
*/
void
irc_server_check_echo_msg_recv_cb (void *data,
struct t_hashtable *hashtable,
const void *key, const void *value)
{
/* make C compiler happy */
(void) data;
if (*((time_t *)value) + (60 * 5) < time (NULL))
weechat_hashtable_remove (hashtable, key);
}
/*
* Timer called each second to perform some operations on servers.
*/
@@ -4094,6 +4117,9 @@ irc_server_timer_cb (const void *pointer, void *data, int remaining_calls)
NULL);
}
}
weechat_hashtable_map (ptr_server->echo_msg_recv,
&irc_server_check_echo_msg_recv_cb,
NULL);
ptr_batch = ptr_server->batches;
while (ptr_batch)
{
@@ -4196,6 +4222,9 @@ irc_server_close_connection (struct t_irc_server *server)
/* remove all keys for joins without switch */
weechat_hashtable_remove_all (server->join_noswitch);
/* remove all messages stored (with capability echo-message) */
weechat_hashtable_remove_all (server->echo_msg_recv);
/* remove all batched events pending */
irc_batch_free_all (server);
@@ -6476,6 +6505,7 @@ irc_server_hdata_server_cb (const void *pointer, void *data,
WEECHAT_HDATA_VAR(struct t_irc_server, join_manual, HASHTABLE, 0, NULL, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, join_channel_key, HASHTABLE, 0, NULL, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, join_noswitch, HASHTABLE, 0, NULL, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, echo_msg_recv, HASHTABLE, 0, NULL, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, batches, POINTER, 0, NULL, "irc_batch");
WEECHAT_HDATA_VAR(struct t_irc_server, last_batch, POINTER, 0, NULL, "irc_batch");
WEECHAT_HDATA_VAR(struct t_irc_server, buffer, POINTER, 0, NULL, "buffer");
@@ -7265,6 +7295,9 @@ irc_server_print_log ()
weechat_log_printf (" join_noswitch . . . . . . : 0x%lx (hashtable: '%s')",
ptr_server->join_noswitch,
weechat_hashtable_get_string (ptr_server->join_noswitch, "keys_values"));
weechat_log_printf (" echo_msg_recv . . . . . . : 0x%lx (hashtable: '%s')",
ptr_server->echo_msg_recv,
weechat_hashtable_get_string (ptr_server->echo_msg_recv, "keys_values"));
weechat_log_printf (" batches . . . . . . . . . : 0x%lx", ptr_server->batches);
weechat_log_printf (" last_batch. . . . . . . . : 0x%lx", ptr_server->last_batch);
weechat_log_printf (" buffer. . . . . . . . . . : 0x%lx", ptr_server->buffer);
+1
View File
@@ -289,6 +289,7 @@ struct t_irc_server
struct t_hashtable *join_manual; /* manual joins pending */
struct t_hashtable *join_channel_key; /* keys pending for joins */
struct t_hashtable *join_noswitch; /* joins w/o switch to buffer */
struct t_hashtable *echo_msg_recv; /* msg received with echo-message */
struct t_irc_batch *batches; /* batched events (cap "batch") */
struct t_irc_batch *last_batch; /* last batch */
struct t_gui_buffer *buffer; /* GUI buffer allocated for server */
+2
View File
@@ -149,6 +149,8 @@ irc_signal_upgrade_cb (const void *pointer, void *data,
"work for servers connected via TLS"),
weechat_prefix ("error"), IRC_PLUGIN_NAME);
}
/* send QUIT to server, then disconnect */
irc_command_quit_server (ptr_server, NULL);
irc_server_disconnect (ptr_server, 0, 0);
/*
* schedule reconnection: WeeChat will reconnect to this server
+4 -15
View File
@@ -114,7 +114,7 @@ plugin_config_set (const char *plugin_name, const char *option_name,
const char *value)
{
int length, rc;
char *option_full_name, *option_full_name_lower;
char *option_full_name;
rc = WEECHAT_CONFIG_OPTION_SET_ERROR;
@@ -124,12 +124,7 @@ plugin_config_set (const char *plugin_name, const char *option_name,
{
snprintf (option_full_name, length, "%s.%s",
plugin_name, option_name);
option_full_name_lower = string_tolower (option_full_name);
if (option_full_name_lower)
{
rc = plugin_config_set_internal (option_full_name_lower, value);
free (option_full_name_lower);
}
rc = plugin_config_set_internal (option_full_name, value);
free (option_full_name);
}
@@ -206,7 +201,7 @@ plugin_config_set_desc (const char *plugin_name, const char *option_name,
const char *description)
{
int length;
char *option_full_name, *option_full_name_lower;
char *option_full_name;
length = strlen (plugin_name) + 1 + strlen (option_name) + 1;
option_full_name = malloc (length);
@@ -214,13 +209,7 @@ plugin_config_set_desc (const char *plugin_name, const char *option_name,
{
snprintf (option_full_name, length, "%s.%s",
plugin_name, option_name);
option_full_name_lower = string_tolower (option_full_name);
if (option_full_name_lower)
{
plugin_config_set_desc_internal (option_full_name_lower,
description);
free (option_full_name_lower);
}
plugin_config_set_desc_internal (option_full_name, description);
free (option_full_name);
}
}
+2
View File
@@ -1090,6 +1090,8 @@ TEST(CoreString, IsWhitespaceChar)
LONGS_EQUAL(1, string_is_whitespace_char (" abc def"));
LONGS_EQUAL(1, string_is_whitespace_char ("\tabc def"));
LONGS_EQUAL(1, string_is_whitespace_char ("\nabc def"));
LONGS_EQUAL(1, string_is_whitespace_char ("\rabc def"));
}
/*
+27 -4
View File
@@ -2950,10 +2950,33 @@ TEST(IrcProtocolWithServer, privmsg)
* valid CTCP to channel from self nick
* (case of bouncer of if echo-message capability is enabled)
*/
RECV(":alice!user@host PRIVMSG bob :\01VERSION\01");
CHECK_PV("bob", "--", "CTCP query to bob: VERSION",
"irc_privmsg,irc_ctcp,self_msg,notify_none,no_highlight,"
"nick_alice,host_user@host,log1");
RECV(":alice!user@host PRIVMSG alice :\01CLIENTINFO\01");
if (i == 0)
{
CHECK_SRV("--", "CTCP requested by alice: CLIENTINFO",
"irc_privmsg,irc_ctcp,host_user@host,log1");
CHECK_SRV("--", "CTCP reply to alice: CLIENTINFO ACTION DCC "
"CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION",
"irc_privmsg,irc_ctcp,irc_ctcp_reply,self_msg,notify_none,"
"no_highlight,log1");
}
else
{
CHECK_PV("alice", "--", "CTCP query to alice: CLIENTINFO",
"irc_privmsg,irc_ctcp,self_msg,notify_none,no_highlight,"
"nick_alice,host_user@host,log1");
/*
* with echo-message capability, when the same message is received
* for the second time, the request and reply are displayed
*/
RECV(":alice!user@host PRIVMSG alice :\01CLIENTINFO\01");
CHECK_SRV("--", "CTCP requested by alice: CLIENTINFO",
"irc_privmsg,irc_ctcp,host_user@host,log1");
CHECK_SRV("--", "CTCP reply to alice: CLIENTINFO ACTION DCC "
"CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION",
"irc_privmsg,irc_ctcp,irc_ctcp_reply,self_msg,notify_none,"
"no_highlight,log1");
}
/* close xfer buffer */
if (xfer_buffer)
+2 -2
View File
@@ -39,8 +39,8 @@
# devel-number the devel version as hex number ("0x04010000" for "4.1.0-dev")
#
WEECHAT_STABLE="4.0.0"
WEECHAT_DEVEL="4.0.0"
WEECHAT_STABLE="4.0.1"
WEECHAT_DEVEL="4.0.1"
STABLE_MAJOR=$(echo "${WEECHAT_STABLE}" | cut -d"." -f1)
STABLE_MINOR=$(echo "${WEECHAT_STABLE}" | cut -d"." -f2)