1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

core: refactor code to send WeeChat version to the buffer

This commit is contained in:
Sébastien Helleu
2024-10-06 17:40:34 +02:00
parent e29332ead6
commit 453e60ed23
+11 -28
View File
@@ -7499,34 +7499,17 @@ command_version_display (struct t_gui_buffer *buffer,
if (send_to_buffer_as_input)
{
if (translated_string)
{
snprintf (string, sizeof (string),
"WeeChat %s [%s %s %s]",
(display_git_version) ? version_get_version_with_git () : version_get_version (),
_("compiled on"),
version_get_compilation_date (),
version_get_compilation_time ());
(void) input_data (buffer,
string,
NULL,
0, /* split_newline */
0); /* user_data */
}
else
{
snprintf (string, sizeof (string),
"WeeChat %s [%s %s %s]",
(display_git_version) ? version_get_version_with_git () : version_get_version (),
"compiled on",
version_get_compilation_date (),
version_get_compilation_time ());
(void) input_data (buffer,
string,
NULL,
0, /* split_newline */
0); /* user_data */
}
snprintf (string, sizeof (string),
"WeeChat %s [%s %s %s]",
(display_git_version) ? version_get_version_with_git () : version_get_version (),
(translated_string) ? _("compiled on") : "compiled on",
version_get_compilation_date (),
version_get_compilation_time ());
(void) input_data (buffer,
string,
NULL,
0, /* split_newline */
0); /* user_data */
}
else
{