summaryrefslogtreecommitdiff
path: root/src/plugins/relay/relay-config.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-05-01 10:10:36 +0200
committerSébastien Helleu <flashcode@flashtux.org>2024-05-01 10:10:36 +0200
commit6c1f21f10c4f740c88c56228a725b5f47ce4ca52 (patch)
tree4577edcd969052975056d460e5115c2d3511cee2 /src/plugins/relay/relay-config.c
parentee3fb67a0c57d174e9220b61a51b86aee78c8f3f (diff)
downloadweechat-6c1f21f10c4f740c88c56228a725b5f47ce4ca52.zip
relay: add option relay.api.remote_get_lines (issue #2066)
Diffstat (limited to 'src/plugins/relay/relay-config.c')
-rw-r--r--src/plugins/relay/relay-config.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/plugins/relay/relay-config.c b/src/plugins/relay/relay-config.c
index dfd00ef57..f41af69e5 100644
--- a/src/plugins/relay/relay-config.c
+++ b/src/plugins/relay/relay-config.c
@@ -49,6 +49,7 @@ struct t_config_section *relay_config_section_look = NULL;
struct t_config_section *relay_config_section_color = NULL;
struct t_config_section *relay_config_section_network = NULL;
struct t_config_section *relay_config_section_irc = NULL;
+struct t_config_section *relay_config_section_api = NULL;
struct t_config_section *relay_config_section_port = NULL;
struct t_config_section *relay_config_section_path = NULL;
struct t_config_section *relay_config_section_remote = NULL;
@@ -100,6 +101,10 @@ struct t_config_option *relay_config_irc_backlog_since_last_message = NULL;
struct t_config_option *relay_config_irc_backlog_tags = NULL;
struct t_config_option *relay_config_irc_backlog_time_format = NULL;
+/* relay config, api section */
+
+struct t_config_option *relay_config_api_remote_get_lines = NULL;
+
/* other */
int relay_config_auto_open_buffer[RELAY_NUM_PROTOCOLS];
@@ -1795,6 +1800,26 @@ relay_config_init ()
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
}
+ /* section api */
+ relay_config_section_api = weechat_config_new_section (
+ relay_config_file, "api",
+ 0, 0,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL,
+ NULL, NULL, NULL);
+ if (relay_config_section_api)
+ {
+ relay_config_api_remote_get_lines = weechat_config_new_option (
+ relay_config_file, relay_config_section_api,
+ "remote_get_lines", "integer",
+ N_("number of lines to retrieve on each buffer when connecting "
+ "to a remote relay"),
+ NULL, 0, INT_MAX, "1000", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ }
+
/* section port */
relay_config_section_port = weechat_config_new_section (
relay_config_file, "port",