1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 07:16:37 +02:00

relay/api: add support of time displayed in remote client buffers

This commit is contained in:
Sébastien Helleu
2024-08-10 14:29:30 +02:00
parent aeac9f02f9
commit 8010eeece3
3 changed files with 7 additions and 3 deletions
@@ -95,6 +95,7 @@ relay_api_protocol_signal_buffer_cb (const void *pointer, void *data,
|| (strcmp (signal, "buffer_renamed") == 0)
|| (strcmp (signal, "buffer_title_changed") == 0)
|| (strcmp (signal, "buffer_modes_changed") == 0)
|| (strcmp (signal, "buffer_time_for_each_line_changed") == 0)
|| (strncmp (signal, "buffer_localvar_", 16) == 0)
|| (strcmp (signal, "buffer_cleared") == 0)
|| (strcmp (signal, "buffer_closing") == 0)
@@ -842,8 +842,8 @@ RELAY_REMOTE_EVENT_CALLBACK(buffer)
const char *ptr_key, *ptr_command;
char *full_name, str_number[64], str_local_var[1024], *property;
long long id;
int number, hidden, nicklist;
int nicklist_case_sensitive, nicklist_display_groups;
int number, hidden, nicklist, nicklist_case_sensitive;
int nicklist_display_groups, time_displayed;
int apply_props, input_position, input_multiline;
if (!event->json)
@@ -864,6 +864,7 @@ RELAY_REMOTE_EVENT_CALLBACK(buffer)
JSON_GET_BOOL(event->json, nicklist);
JSON_GET_BOOL(event->json, nicklist_case_sensitive);
JSON_GET_BOOL(event->json, nicklist_display_groups);
JSON_GET_BOOL(event->json, time_displayed);
buffer_props = weechat_hashtable_new (32,
WEECHAT_HASHTABLE_STRING,
@@ -887,6 +888,8 @@ RELAY_REMOTE_EVENT_CALLBACK(buffer)
(nicklist_case_sensitive) ? "1" : "0");
weechat_hashtable_set (buffer_props, "nicklist_display_groups",
(nicklist_display_groups) ? "1" : "0");
weechat_hashtable_set (buffer_props, "time_for_each_line",
(time_displayed) ? "1" : "0");
/* extra properties for relay */
weechat_hashtable_set (buffer_props,