summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-config.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-04-01 20:56:11 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-04-01 20:56:11 +0200
commit4aabe8681fd88dbb412b8ac69805d92713ca2ecc (patch)
treeeb79f8b87fa008601ca7d2fa1138b958ba7f55d5 /src/plugins/irc/irc-config.c
parent3e9524ee656568ec4164b083bc9e847e91a35392 (diff)
downloadweechat-4aabe8681fd88dbb412b8ac69805d92713ca2ecc.zip
core, plugins: set options to NULL by default, refactor config init functions
Diffstat (limited to 'src/plugins/irc/irc-config.c')
-rw-r--r--src/plugins/irc/irc-config.c1921
1 files changed, 947 insertions, 974 deletions
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c
index 57304bf38..bc243b15f 100644
--- a/src/plugins/irc/irc-config.c
+++ b/src/plugins/irc/irc-config.c
@@ -42,8 +42,15 @@
struct t_config_file *irc_config_file = NULL;
+
+/* sections */
+
+struct t_config_section *irc_config_section_look = NULL;
+struct t_config_section *irc_config_section_color = NULL;
+struct t_config_section *irc_config_section_network = NULL;
struct t_config_section *irc_config_section_msgbuffer = NULL;
struct t_config_section *irc_config_section_ctcp = NULL;
+struct t_config_section *irc_config_section_ignore = NULL;
struct t_config_section *irc_config_section_server_default = NULL;
struct t_config_section *irc_config_section_server = NULL;
@@ -51,119 +58,122 @@ int irc_config_loading = 0;
/* IRC config, look section */
-struct t_config_option *irc_config_look_buffer_open_before_autojoin;
-struct t_config_option *irc_config_look_buffer_open_before_join;
-struct t_config_option *irc_config_look_buffer_switch_autojoin;
-struct t_config_option *irc_config_look_buffer_switch_join;
-struct t_config_option *irc_config_look_color_nicks_in_names;
-struct t_config_option *irc_config_look_color_nicks_in_nicklist;
-struct t_config_option *irc_config_look_color_nicks_in_server_messages;
-struct t_config_option *irc_config_look_color_pv_nick_like_channel;
-struct t_config_option *irc_config_look_ctcp_time_format;
-struct t_config_option *irc_config_look_display_account_message;
-struct t_config_option *irc_config_look_display_away;
-struct t_config_option *irc_config_look_display_ctcp_blocked;
-struct t_config_option *irc_config_look_display_ctcp_reply;
-struct t_config_option *irc_config_look_display_ctcp_unknown;
-struct t_config_option *irc_config_look_display_extended_join;
-struct t_config_option *irc_config_look_display_host_join;
-struct t_config_option *irc_config_look_display_host_join_local;
-struct t_config_option *irc_config_look_display_host_quit;
-struct t_config_option *irc_config_look_display_join_message;
-struct t_config_option *irc_config_look_display_old_topic;
-struct t_config_option *irc_config_look_display_pv_away_once;
-struct t_config_option *irc_config_look_display_pv_back;
-struct t_config_option *irc_config_look_display_pv_nick_change;
-struct t_config_option *irc_config_look_display_pv_warning_address;
-struct t_config_option *irc_config_look_highlight_channel;
-struct t_config_option *irc_config_look_highlight_pv;
-struct t_config_option *irc_config_look_highlight_server;
-struct t_config_option *irc_config_look_highlight_tags_restrict;
-struct t_config_option *irc_config_look_item_channel_modes_hide_args;
-struct t_config_option *irc_config_look_item_display_server;
-struct t_config_option *irc_config_look_item_nick_modes;
-struct t_config_option *irc_config_look_item_nick_prefix;
-struct t_config_option *irc_config_look_join_auto_add_chantype;
-struct t_config_option *irc_config_look_msgbuffer_fallback;
-struct t_config_option *irc_config_look_new_channel_position;
-struct t_config_option *irc_config_look_new_pv_position;
-struct t_config_option *irc_config_look_nick_completion_smart;
-struct t_config_option *irc_config_look_nick_mode;
-struct t_config_option *irc_config_look_nick_mode_empty;
-struct t_config_option *irc_config_look_nicks_hide_password;
-struct t_config_option *irc_config_look_notice_as_pv;
-struct t_config_option *irc_config_look_notice_welcome_redirect;
-struct t_config_option *irc_config_look_notice_welcome_tags;
-struct t_config_option *irc_config_look_notify_tags_ison;
-struct t_config_option *irc_config_look_notify_tags_whois;
-struct t_config_option *irc_config_look_part_closes_buffer;
-struct t_config_option *irc_config_look_pv_buffer;
-struct t_config_option *irc_config_look_pv_tags;
-struct t_config_option *irc_config_look_raw_messages;
-struct t_config_option *irc_config_look_typing_status_nicks;
-struct t_config_option *irc_config_look_typing_status_self;
-struct t_config_option *irc_config_look_server_buffer;
-struct t_config_option *irc_config_look_smart_filter;
-struct t_config_option *irc_config_look_smart_filter_account;
-struct t_config_option *irc_config_look_smart_filter_chghost;
-struct t_config_option *irc_config_look_smart_filter_delay;
-struct t_config_option *irc_config_look_smart_filter_join;
-struct t_config_option *irc_config_look_smart_filter_join_unmask;
-struct t_config_option *irc_config_look_smart_filter_mode;
-struct t_config_option *irc_config_look_smart_filter_nick;
-struct t_config_option *irc_config_look_smart_filter_quit;
-struct t_config_option *irc_config_look_smart_filter_setname;
-struct t_config_option *irc_config_look_temporary_servers;
-struct t_config_option *irc_config_look_topic_strip_colors;
+struct t_config_option *irc_config_look_buffer_open_before_autojoin = NULL;
+struct t_config_option *irc_config_look_buffer_open_before_join = NULL;
+struct t_config_option *irc_config_look_buffer_switch_autojoin = NULL;
+struct t_config_option *irc_config_look_buffer_switch_join = NULL;
+struct t_config_option *irc_config_look_color_nicks_in_names = NULL;
+struct t_config_option *irc_config_look_color_nicks_in_nicklist = NULL;
+struct t_config_option *irc_config_look_color_nicks_in_server_messages = NULL;
+struct t_config_option *irc_config_look_color_pv_nick_like_channel = NULL;
+struct t_config_option *irc_config_look_ctcp_time_format = NULL;
+struct t_config_option *irc_config_look_display_account_message = NULL;
+struct t_config_option *irc_config_look_display_away = NULL;
+struct t_config_option *irc_config_look_display_ctcp_blocked = NULL;
+struct t_config_option *irc_config_look_display_ctcp_reply = NULL;
+struct t_config_option *irc_config_look_display_ctcp_unknown = NULL;
+struct t_config_option *irc_config_look_display_extended_join = NULL;
+struct t_config_option *irc_config_look_display_host_join = NULL;
+struct t_config_option *irc_config_look_display_host_join_local = NULL;
+struct t_config_option *irc_config_look_display_host_quit = NULL;
+struct t_config_option *irc_config_look_display_join_message = NULL;
+struct t_config_option *irc_config_look_display_old_topic = NULL;
+struct t_config_option *irc_config_look_display_pv_away_once = NULL;
+struct t_config_option *irc_config_look_display_pv_back = NULL;
+struct t_config_option *irc_config_look_display_pv_nick_change = NULL;
+struct t_config_option *irc_config_look_display_pv_warning_address = NULL;
+struct t_config_option *irc_config_look_highlight_channel = NULL;
+struct t_config_option *irc_config_look_highlight_pv = NULL;
+struct t_config_option *irc_config_look_highlight_server = NULL;
+struct t_config_option *irc_config_look_highlight_tags_restrict = NULL;
+struct t_config_option *irc_config_look_item_channel_modes_hide_args = NULL;
+struct t_config_option *irc_config_look_item_display_server = NULL;
+struct t_config_option *irc_config_look_item_nick_modes = NULL;
+struct t_config_option *irc_config_look_item_nick_prefix = NULL;
+struct t_config_option *irc_config_look_join_auto_add_chantype = NULL;
+struct t_config_option *irc_config_look_msgbuffer_fallback = NULL;
+struct t_config_option *irc_config_look_new_channel_position = NULL;
+struct t_config_option *irc_config_look_new_pv_position = NULL;
+struct t_config_option *irc_config_look_nick_completion_smart = NULL;
+struct t_config_option *irc_config_look_nick_mode = NULL;
+struct t_config_option *irc_config_look_nick_mode_empty = NULL;
+struct t_config_option *irc_config_look_nicks_hide_password = NULL;
+struct t_config_option *irc_config_look_notice_as_pv = NULL;
+struct t_config_option *irc_config_look_notice_welcome_redirect = NULL;
+struct t_config_option *irc_config_look_notice_welcome_tags = NULL;
+struct t_config_option *irc_config_look_notify_tags_ison = NULL;
+struct t_config_option *irc_config_look_notify_tags_whois = NULL;
+struct t_config_option *irc_config_look_part_closes_buffer = NULL;
+struct t_config_option *irc_config_look_pv_buffer = NULL;
+struct t_config_option *irc_config_look_pv_tags = NULL;
+struct t_config_option *irc_config_look_raw_messages = NULL;
+struct t_config_option *irc_config_look_typing_status_nicks = NULL;
+struct t_config_option *irc_config_look_typing_status_self = NULL;
+struct t_config_option *irc_config_look_server_buffer = NULL;
+struct t_config_option *irc_config_look_smart_filter = NULL;
+struct t_config_option *irc_config_look_smart_filter_account = NULL;
+struct t_config_option *irc_config_look_smart_filter_chghost = NULL;
+struct t_config_option *irc_config_look_smart_filter_delay = NULL;
+struct t_config_option *irc_config_look_smart_filter_join = NULL;
+struct t_config_option *irc_config_look_smart_filter_join_unmask = NULL;
+struct t_config_option *irc_config_look_smart_filter_mode = NULL;
+struct t_config_option *irc_config_look_smart_filter_nick = NULL;
+struct t_config_option *irc_config_look_smart_filter_quit = NULL;
+struct t_config_option *irc_config_look_smart_filter_setname = NULL;
+struct t_config_option *irc_config_look_temporary_servers = NULL;
+struct t_config_option *irc_config_look_topic_strip_colors = NULL;
/* IRC config, color section */
-struct t_config_option *irc_config_color_input_nick;
-struct t_config_option *irc_config_color_item_channel_modes;
-struct t_config_option *irc_config_color_item_lag_counting;
-struct t_config_option *irc_config_color_item_lag_finished;
-struct t_config_option *irc_config_color_item_nick_modes;
-struct t_config_option *irc_config_color_item_tls_version_deprecated;
-struct t_config_option *irc_config_color_item_tls_version_insecure;
-struct t_config_option *irc_config_color_item_tls_version_ok;
-struct t_config_option *irc_config_color_message_account;
-struct t_config_option *irc_config_color_message_join;
-struct t_config_option *irc_config_color_message_chghost;
-struct t_config_option *irc_config_color_message_join;
-struct t_config_option *irc_config_color_message_kick;
-struct t_config_option *irc_config_color_message_quit;
-struct t_config_option *irc_config_color_message_setname;
-struct t_config_option *irc_config_color_mirc_remap;
-struct t_config_option *irc_config_color_nick_prefixes;
-struct t_config_option *irc_config_color_notice;
-struct t_config_option *irc_config_color_reason_kick;
-struct t_config_option *irc_config_color_reason_quit;
-struct t_config_option *irc_config_color_topic_current;
-struct t_config_option *irc_config_color_topic_new;
-struct t_config_option *irc_config_color_topic_old;
+struct t_config_option *irc_config_color_input_nick = NULL;
+struct t_config_option *irc_config_color_item_channel_modes = NULL;
+struct t_config_option *irc_config_color_item_lag_counting = NULL;
+struct t_config_option *irc_config_color_item_lag_finished = NULL;
+struct t_config_option *irc_config_color_item_nick_modes = NULL;
+struct t_config_option *irc_config_color_item_tls_version_deprecated = NULL;
+struct t_config_option *irc_config_color_item_tls_version_insecure = NULL;
+struct t_config_option *irc_config_color_item_tls_version_ok = NULL;
+struct t_config_option *irc_config_color_message_account = NULL;
+struct t_config_option *irc_config_color_message_chghost = NULL;
+struct t_config_option *irc_config_color_message_join = NULL;
+struct t_config_option *irc_config_color_message_kick = NULL;
+struct t_config_option *irc_config_color_message_quit = NULL;
+struct t_config_option *irc_config_color_message_setname = NULL;
+struct t_config_option *irc_config_color_mirc_remap = NULL;
+struct t_config_option *irc_config_color_nick_prefixes = NULL;
+struct t_config_option *irc_config_color_notice = NULL;
+struct t_config_option *irc_config_color_reason_kick = NULL;
+struct t_config_option *irc_config_color_reason_quit = NULL;
+struct t_config_option *irc_config_color_topic_current = NULL;
+struct t_config_option *irc_config_color_topic_new = NULL;
+struct t_config_option *irc_config_color_topic_old = NULL;
/* IRC config, network section */
-struct t_config_option *irc_config_network_autoreconnect_delay_growing;
-struct t_config_option *irc_config_network_autoreconnect_delay_max;
-struct t_config_option *irc_config_network_ban_mask_default;
-struct t_config_option *irc_config_network_colors_receive;
-struct t_config_option *irc_config_network_colors_send;
-struct t_config_option *irc_config_network_lag_check;
-struct t_config_option *irc_config_network_lag_max;
-struct t_config_option *irc_config_network_lag_min_show;
-struct t_config_option *irc_config_network_lag_reconnect;
-struct t_config_option *irc_config_network_lag_refresh_interval;
-struct t_config_option *irc_config_network_notify_check_ison;
-struct t_config_option *irc_config_network_notify_check_whois;
-struct t_config_option *irc_config_network_sasl_fail_unavailable;
-struct t_config_option *irc_config_network_send_unknown_commands;
-struct t_config_option *irc_config_network_whois_double_nick;
+struct t_config_option *irc_config_network_autoreconnect_delay_growing = NULL;
+struct t_config_option *irc_config_network_autoreconnect_delay_max = NULL;
+struct t_config_option *irc_config_network_ban_mask_default = NULL;
+struct t_config_option *irc_config_network_colors_receive = NULL;
+struct t_config_option *irc_config_network_colors_send = NULL;
+struct t_config_option *irc_config_network_lag_check = NULL;
+struct t_config_option *irc_config_network_lag_max = NULL;
+struct t_config_option *irc_config_network_lag_min_show = NULL;
+struct t_config_option *irc_config_network_lag_reconnect = NULL;
+struct t_config_option *irc_config_network_lag_refresh_interval = NULL;
+struct t_config_option *irc_config_network_notify_check_ison = NULL;
+struct t_config_option *irc_config_network_notify_check_whois = NULL;
+struct t_config_option *irc_config_network_sasl_fail_unavailable = NULL;
+struct t_config_option *irc_config_network_send_unknown_commands = NULL;
+struct t_config_option *irc_config_network_whois_double_nick = NULL;
/* IRC config, server section */
-struct t_config_option *irc_config_server_default[IRC_SERVER_NUM_OPTIONS];
-
+struct t_config_option *irc_config_server_default[IRC_SERVER_NUM_OPTIONS] = {
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+};
struct t_hook *irc_config_hook_config_nick_color_options = NULL;
struct t_hook *irc_config_hook_config_chat_nick_colors = NULL;
struct t_hashtable *irc_config_hashtable_display_join_message = NULL;
@@ -2751,8 +2761,6 @@ irc_config_server_create_default_options (struct t_config_section *section)
int
irc_config_init ()
{
- struct t_config_section *ptr_section;
-
irc_config_hashtable_display_join_message = weechat_hashtable_new (
32,
WEECHAT_HASHTABLE_STRING,
@@ -2775,858 +2783,857 @@ irc_config_init ()
return 0;
/* look */
- ptr_section = weechat_config_new_section (irc_config_file, "look",
- 0, 0,
- NULL, NULL, NULL,
- NULL, NULL, NULL,
- NULL, NULL, NULL,
- NULL, NULL, NULL,
- NULL, NULL, NULL);
- if (!ptr_section)
- {
- weechat_config_free (irc_config_file);
- irc_config_file = NULL;
- return 0;
- }
-
- irc_config_look_buffer_open_before_autojoin = weechat_config_new_option (
- irc_config_file, ptr_section,
- "buffer_open_before_autojoin", "boolean",
- N_("open channel buffer before the JOIN is received from server "
- "when it is auto joined (with server option \"autojoin\"); "
- "this is useful to open channels with always the same buffer "
- "numbers on startup"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_buffer_open_before_join = weechat_config_new_option (
- irc_config_file, ptr_section,
- "buffer_open_before_join", "boolean",
- N_("open channel buffer before the JOIN is received from server "
- "when it is manually joined (with /join command)"),
- NULL, 0, 0, "off", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_buffer_switch_autojoin = weechat_config_new_option (
- irc_config_file, ptr_section,
- "buffer_switch_autojoin", "boolean",
- N_("auto switch to channel buffer when it is auto joined (with "
- "server option \"autojoin\")"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_buffer_switch_join = weechat_config_new_option (
- irc_config_file, ptr_section,
- "buffer_switch_join", "boolean",
- N_("auto switch to channel buffer when it is manually joined "
- "(with /join command)"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_color_nicks_in_names = weechat_config_new_option (
- irc_config_file, ptr_section,
- "color_nicks_in_names", "boolean",
- N_("use nick color in output of /names (or list of nicks displayed "
- "when joining a channel)"),
- NULL, 0, 0, "off", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_color_nicks_in_nicklist = weechat_config_new_option (
- irc_config_file, ptr_section,
- "color_nicks_in_nicklist", "boolean",
- N_("use nick color in nicklist"),
- NULL, 0, 0, "off", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_look_color_nicks_in_nicklist, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_look_color_nicks_in_server_messages = weechat_config_new_option (
- irc_config_file, ptr_section,
- "color_nicks_in_server_messages", "boolean",
- N_("use nick color in messages from server"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_color_pv_nick_like_channel = weechat_config_new_option (
- irc_config_file, ptr_section,
- "color_pv_nick_like_channel", "boolean",
- N_("use same nick color for channel and private"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_ctcp_time_format = weechat_config_new_option (
- irc_config_file, ptr_section,
- "ctcp_time_format", "string",
- N_("time format used in answer to message CTCP TIME (see man strftime "
- "for date/time specifiers)"),
- NULL, 0, 0, "%a, %d %b %Y %T %z", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_display_account_message = weechat_config_new_option (
- irc_config_file, ptr_section,
- "display_account_message", "boolean",
- N_("display ACCOUNT messages received when capability account-notify "
- "is enabled"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_display_away = weechat_config_new_option (
- irc_config_file, ptr_section,
- "display_away", "integer",
- N_("display message when (un)marking as away (off: do not display/send "
- "anything, local: display locally, channel: send action to channels)"),
- "off|local|channel", 0, 0, "local", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_look_display_away, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_look_display_ctcp_blocked = weechat_config_new_option (
- irc_config_file, ptr_section,
- "display_ctcp_blocked", "boolean",
- N_("display CTCP message even if it is blocked"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_display_ctcp_reply = weechat_config_new_option (
- irc_config_file, ptr_section,
- "display_ctcp_reply", "boolean",
- N_("display CTCP reply sent by WeeChat"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_display_ctcp_unknown = weechat_config_new_option (
- irc_config_file, ptr_section,
- "display_ctcp_unknown", "boolean",
- N_("display CTCP message even if it is unknown CTCP"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_display_extended_join = weechat_config_new_option (
- irc_config_file, ptr_section,
- "display_extended_join", "boolean",
- N_("display extra information in the JOIN messages: account name "
- "and real name (capability extended-join must be enabled)"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_display_host_join = weechat_config_new_option (
- irc_config_file, ptr_section,
- "display_host_join", "boolean",
- N_("display host in join messages"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_display_host_join_local = weechat_config_new_option (
- irc_config_file, ptr_section,
- "display_host_join_local", "boolean",
- N_("display host in join messages from local client"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_display_host_quit = weechat_config_new_option (
- irc_config_file, ptr_section,
- "display_host_quit", "boolean",
- N_("display host in part/quit messages"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_display_join_message = weechat_config_new_option (
- irc_config_file, ptr_section,
- "display_join_message", "string",
- N_("comma-separated list of messages to display after joining a "
- "channel: 324 = channel modes, 329 = channel creation date, "
- "332 = topic, 333 = nick/date for topic, 353 = names on channel, "
- "366 = names count"),
- NULL, 0, 0, "329,332,333,366", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_look_display_join_message, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_look_display_old_topic = weechat_config_new_option (
- irc_config_file, ptr_section,
- "display_old_topic", "boolean",
- N_("display old topic when channel topic is changed"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_display_pv_away_once = weechat_config_new_option (
- irc_config_file, ptr_section,
- "display_pv_away_once", "boolean",
- N_("display remote away message only once in private"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_display_pv_back = weechat_config_new_option (
- irc_config_file, ptr_section,
- "display_pv_back", "boolean",
- N_("display a message in private when user is back (after quit on "
- "server)"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_display_pv_nick_change = weechat_config_new_option (
- irc_config_file, ptr_section,
- "display_pv_nick_change", "boolean",
- N_("display nick change in private"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_display_pv_warning_address = weechat_config_new_option (
- irc_config_file, ptr_section,
- "display_pv_warning_address", "boolean",
- N_("display a warning in private buffer if the address of remote nick "
- "has changed; this option is disabled by default because servers "
- "like bitlbee are causing this warning to be displayed when it is "
- "not expected (the address of remote nick changes multiple times "
- "on login)"),
- NULL, 0, 0, "off", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_highlight_channel = weechat_config_new_option (
- irc_config_file, ptr_section,
- "highlight_channel", "string",
- N_("comma separated list of words to highlight in channel buffers "
- "(case insensitive, use \"(?-i)\" at beginning of words to "
- "make them case sensitive; special variables $nick, $channel and "
- "$server are replaced by their values), these words are added to "
- "buffer property \"highlight_words\" only when buffer is created "
- "(it does not affect current buffers), an empty string disables "
- "default highlight on nick, examples: \"$nick\", \"(?-i)$nick\""),
- NULL, 0, 0, "$nick", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_highlight_pv = weechat_config_new_option (
- irc_config_file, ptr_section,
- "highlight_pv", "string",
- N_("comma separated list of words to highlight in private buffers "
- "(case insensitive, use \"(?-i)\" at beginning of words to "
- "make them case sensitive; special variables $nick, $channel and "
- "$server are replaced by their values), these words are added to "
- "buffer property \"highlight_words\" only when buffer is created "
- "(it does not affect current buffers), an empty string disables "
- "default highlight on nick, examples: \"$nick\", \"(?-i)$nick\""),
- NULL, 0, 0, "$nick", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_highlight_server = weechat_config_new_option (
- irc_config_file, ptr_section,
- "highlight_server", "string",
- N_("comma separated list of words to highlight in server buffers "
- "(case insensitive, use \"(?-i)\" at beginning of words to "
- "make them case sensitive; special variables $nick, $channel and "
- "$server are replaced by their values), these words are added to "
- "buffer property \"highlight_words\" only when buffer is created "
- "(it does not affect current buffers), an empty string disables "
- "default highlight on nick, examples: \"$nick\", \"(?-i)$nick\""),
- NULL, 0, 0, "$nick", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_highlight_tags_restrict = weechat_config_new_option (
- irc_config_file, ptr_section,
- "highlight_tags_restrict", "string",
- N_("restrict highlights to these tags on irc buffers (to have "
- "highlight on user messages but not server messages); tags "
- "must be separated by a comma and \"+\" can be used to make a "
- "logical \"and\" between tags; wildcard \"*\" is allowed in tags; "
- "an empty value allows highlight on any tag"),
- NULL, 0, 0, "irc_privmsg,irc_notice", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_look_highlight_tags_restrict, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_look_item_channel_modes_hide_args = weechat_config_new_option (
- irc_config_file, ptr_section,
- "item_channel_modes_hide_args", "string",
- N_("hide channel modes arguments if at least one of these modes is in "
- "channel modes (\"*\" to always hide all arguments, empty value to "
- "never hide arguments); example: \"kf\" to hide arguments if \"k\" "
- "or \"f\" are in channel modes"),
- NULL, 0, 0, "k", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_look_item_channel_modes_hide_args, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_look_item_display_server = weechat_config_new_option (
- irc_config_file, ptr_section,
- "item_display_server", "integer",
- N_("name of bar item where IRC server is displayed (for status bar)"),
- "buffer_plugin|buffer_name", 0, 0, "buffer_plugin", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_look_item_display_server, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_look_item_nick_modes = weechat_config_new_option (
- irc_config_file, ptr_section,
- "item_nick_modes", "boolean",
- N_("display nick modes in bar item \"input_prompt\""),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_bar_item_input_prompt, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_look_item_nick_prefix = weechat_config_new_option (
- irc_config_file, ptr_section,
- "item_nick_prefix", "boolean",
- N_("display nick prefix in bar item \"input_prompt\""),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_bar_item_input_prompt, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_look_join_auto_add_chantype = weechat_config_new_option (
- irc_config_file, ptr_section,
- "join_auto_add_chantype", "boolean",
- N_("automatically add channel type in front of channel name on "
- "command /join if the channel name does not start with a valid "
- "channel type for the server; for example: \"/join weechat\" will "
- "in fact send: \"/join #weechat\""),
- NULL, 0, 0, "off", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_msgbuffer_fallback = weechat_config_new_option (
- irc_config_file, ptr_section,
- "msgbuffer_fallback", "integer",
- N_("default target buffer for msgbuffer options when target is "
- "private and that private buffer is not found"),
- "current|server", 0, 0, "current", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_new_channel_position = weechat_config_new_option (
- irc_config_file, ptr_section,
- "new_channel_position", "integer",
- N_("force position of new channel in list of buffers "
- "(none = default position (should be last buffer), "
- "next = current buffer + 1, near_server = after last channel/pv "
- "of server)"),
- "none|next|near_server", 0, 0, "none", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_new_pv_position = weechat_config_new_option (
- irc_config_file, ptr_section,
- "new_pv_position", "integer",
- N_("force position of new private in list of buffers "
- "(none = default position (should be last buffer), "
- "next = current buffer + 1, near_server = after last channel/pv "
- "of server)"),
- "none|next|near_server", 0, 0, "none", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_nick_completion_smart = weechat_config_new_option (
- irc_config_file, ptr_section,
- "nick_completion_smart", "integer",
- N_("smart completion for nicks (completes first with last speakers): "
- "speakers = all speakers (including highlights), "
- "speakers_highlights = only speakers with highlight"),
- "off|speakers|speakers_highlights", 0, 0, "speakers", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_nick_mode = weechat_config_new_option (
- irc_config_file, ptr_section,
- "nick_mode", "integer",
- N_("display nick mode (op, voice, ...) before nick (none = never, "
- "prefix = in prefix only (default), action = in action messages "
- "only, both = prefix + action messages)"),
- "none|prefix|action|both", 0, 0, "prefix", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_nick_mode_empty = weechat_config_new_option (
- irc_config_file, ptr_section,
- "nick_mode_empty", "boolean",
- N_("display a space if nick mode is enabled but nick has no mode (not "
- "op, voice, ...)"),
- NULL, 0, 0, "off", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_bar_item_input_prompt, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_look_nicks_hide_password = weechat_config_new_option (
- irc_config_file, ptr_section,
- "nicks_hide_password", "string",
- N_("comma separated list of nicks for which passwords will be hidden "
- "when a message is sent, for example to hide password in message "
- "displayed by \"/msg nickserv identify password\", example: "
- "\"nickserv,nickbot\""),
- NULL, 0, 0, "nickserv", NULL, 0,
+ irc_config_section_look = weechat_config_new_section (
+ irc_config_file, "look",
+ 0, 0,
NULL, NULL, NULL,
- &irc_config_change_look_nicks_hide_password, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_look_notice_as_pv = weechat_config_new_option (
- irc_config_file, ptr_section,
- "notice_as_pv", "integer",
- N_("display notices as private messages (if auto, use private buffer "
- "if found)"),
- "auto|never|always", 0, 0, "auto", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_notice_welcome_redirect = weechat_config_new_option (
- irc_config_file, ptr_section,
- "notice_welcome_redirect", "boolean",
- N_("automatically redirect channel welcome notices to the channel "
- "buffer; such notices have the nick as target but a channel name "
- "in beginning of notice message, for example the ENTRYMSG notices "
- "sent by Atheme IRC Services which look like: "
- "\"[#channel] Welcome to this channel...\""),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_notice_welcome_tags = weechat_config_new_option (
- irc_config_file, ptr_section,
- "notice_welcome_tags", "string",
- N_("comma separated list of tags used in a welcome notices redirected "
- "to a channel, for example: \"notify_private\""),
- NULL, 0, 0, "", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_notify_tags_ison = weechat_config_new_option (
- irc_config_file, ptr_section,
- "notify_tags_ison", "string",
- N_("comma separated list of tags used in messages displayed by notify "
- "when a nick joins or quits server (result of command ison or "
- "monitor), for example: \"notify_message\", \"notify_private\" or "
- "\"notify_highlight\""),
- NULL, 0, 0, "notify_message", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_notify_tags_whois = weechat_config_new_option (
- irc_config_file, ptr_section,
- "notify_tags_whois", "string",
- N_("comma separated list of tags used in messages displayed by notify "
- "when a nick away status changes (result of command whois), "
- "for example: \"notify_message\", \"notify_private\" or "
- "\"notify_highlight\""),
- NULL, 0, 0, "notify_message", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_part_closes_buffer = weechat_config_new_option (
- irc_config_file, ptr_section,
- "part_closes_buffer", "boolean",
- N_("close buffer when /part is issued on a channel"),
- NULL, 0, 0, "off", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_pv_buffer = weechat_config_new_option (
- irc_config_file, ptr_section,
- "pv_buffer", "integer",
- N_("merge private buffers"),
- "independent|merge_by_server|merge_all", 0, 0, "independent", NULL, 0,
NULL, NULL, NULL,
- &irc_config_change_look_pv_buffer, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_look_pv_tags = weechat_config_new_option (
- irc_config_file, ptr_section,
- "pv_tags", "string",
- N_("comma separated list of tags used in private messages, for example: "
- "\"notify_message\", \"notify_private\" or \"notify_highlight\""),
- NULL, 0, 0, "notify_private", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_raw_messages = weechat_config_new_option (
- irc_config_file, ptr_section,
- "raw_messages", "integer",
- N_("number of raw messages to save in memory when raw data buffer is "
- "closed (messages will be displayed when opening raw data buffer)"),
- NULL, 0, 65535, "256", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_typing_status_nicks = weechat_config_new_option (
- irc_config_file, ptr_section,
- "typing_status_nicks", "boolean",
- N_("display nicks typing on the channel in bar item \"typing\" "
- "(option typing.look.enabled_nicks must be enabled and capability "
- "\"message-tags\" must be enabled on the server)"),
- NULL, 0, 0, "off", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_typing_status_self = weechat_config_new_option (
- irc_config_file, ptr_section,
- "typing_status_self", "boolean",
- N_("send self typing status to channels so that other users see when "
- "you are typing a message "
- "(option typing.look.enabled_self must be enabled and capability "
- "\"message-tags\" must be enabled on the server)"),
- NULL, 0, 0, "off", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_server_buffer = weechat_config_new_option (
- irc_config_file, ptr_section,
- "server_buffer", "integer",
- N_("merge server buffers; this option has no effect if a layout "
- "is saved and is conflicting with this value (see /help layout)"),
- "merge_with_core|merge_without_core|independent", 0, 0, "merge_with_core",
- NULL, 0,
NULL, NULL, NULL,
- &irc_config_change_look_server_buffer, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_look_smart_filter = weechat_config_new_option (
- irc_config_file, ptr_section,
- "smart_filter", "boolean",
- N_("filter join/part/quit/nick messages for a nick if not speaking "
- "for some minutes on channel (you must create a filter on tag "
- "\"irc_smart_filter\", see /help filter)"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_smart_filter_account = weechat_config_new_option (
- irc_config_file, ptr_section,
- "smart_filter_account", "boolean",
- /* TRANSLATORS: please do not translate "account" */
- N_("enable smart filter for \"account\" messages"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_smart_filter_chghost = weechat_config_new_option (
- irc_config_file, ptr_section,
- "smart_filter_chghost", "boolean",
- /* TRANSLATORS: please do not translate "chghost" */
- N_("enable smart filter for \"chghost\" messages"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_smart_filter_delay = weechat_config_new_option (
- irc_config_file, ptr_section,
- "smart_filter_delay", "integer",
- N_("delay for filtering join/part/quit messages (in minutes): if the "
- "nick did not speak during the last N minutes, the join/part/quit is "
- "filtered"),
- NULL, 1, 60*24*7, "5", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_smart_filter_join = weechat_config_new_option (
- irc_config_file, ptr_section,
- "smart_filter_join", "boolean",
- /* TRANSLATORS: please do not translate "join" */
- N_("enable smart filter for \"join\" messages"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_smart_filter_join_unmask = weechat_config_new_option (
- irc_config_file, ptr_section,
- "smart_filter_join_unmask", "integer",
- N_("delay for unmasking a join message that was filtered with tag "
- "\"irc_smart_filter\" (in minutes): if a nick has joined max N "
- "minutes ago and then says something on channel (message, notice or "
- "update on topic), the join is unmasked, as well as nick changes "
- "after this join (0 = disable: never unmask a join)"),
- NULL, 0, 60*24*7, "30", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_smart_filter_mode = weechat_config_new_option (
- irc_config_file, ptr_section,
- "smart_filter_mode", "string",
- /* TRANSLATORS: please do not translate "mode" */
- N_("enable smart filter for \"mode\" messages: \"*\" to filter all "
- "modes, \"+\" to filter all modes in server prefixes (for example "
- "\"ovh\"), \"xyz\" to filter only modes x/y/z, \"-xyz\" to filter "
- "all modes but not x/y/z; examples: \"ovh\": filter modes o/v/h, "
- "\"-bkl\": filter all modes but not b/k/l"),
- NULL, 0, 0, "+", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_smart_filter_nick = weechat_config_new_option (
- irc_config_file, ptr_section,
- "smart_filter_nick", "boolean",
- /* TRANSLATORS: please do not translate "nick" */
- N_("enable smart filter for \"nick\" messages (nick changes)"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_smart_filter_quit = weechat_config_new_option (
- irc_config_file, ptr_section,
- "smart_filter_quit", "boolean",
- /* TRANSLATORS: please do not translate "part" and "quit" */
- N_("enable smart filter for \"part\" and \"quit\" messages"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_smart_filter_setname = weechat_config_new_option (
- irc_config_file, ptr_section,
- "smart_filter_setname", "boolean",
- /* TRANSLATORS: please do not translate "setname" */
- N_("enable smart filter for \"setname\" messages"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_temporary_servers = weechat_config_new_option (
- irc_config_file, ptr_section,
- "temporary_servers", "boolean",
- N_("enable automatic addition of temporary servers with command "
- "/connect"),
- NULL, 0, 0, "off", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_look_topic_strip_colors = weechat_config_new_option (
- irc_config_file, ptr_section,
- "topic_strip_colors", "boolean",
- N_("strip colors in topic (used only when displaying buffer title)"),
- NULL, 0, 0, "off", NULL, 0,
NULL, NULL, NULL,
- &irc_config_change_look_topic_strip_colors, NULL, NULL,
NULL, NULL, NULL);
-
- /* color */
- ptr_section = weechat_config_new_section (irc_config_file, "color",
- 0, 0,
- NULL, NULL, NULL,
- NULL, NULL, NULL,
- NULL, NULL, NULL,
- NULL, NULL, NULL,
- NULL, NULL, NULL);
- if (!ptr_section)
+ if (irc_config_section_look)
{
- weechat_config_free (irc_config_file);
- irc_config_file = NULL;
- return 0;
+ irc_config_look_buffer_open_before_autojoin = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "buffer_open_before_autojoin", "boolean",
+ N_("open channel buffer before the JOIN is received from server "
+ "when it is auto joined (with server option \"autojoin\"); "
+ "this is useful to open channels with always the same buffer "
+ "numbers on startup"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_buffer_open_before_join = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "buffer_open_before_join", "boolean",
+ N_("open channel buffer before the JOIN is received from server "
+ "when it is manually joined (with /join command)"),
+ NULL, 0, 0, "off", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_buffer_switch_autojoin = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "buffer_switch_autojoin", "boolean",
+ N_("auto switch to channel buffer when it is auto joined (with "
+ "server option \"autojoin\")"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_buffer_switch_join = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "buffer_switch_join", "boolean",
+ N_("auto switch to channel buffer when it is manually joined "
+ "(with /join command)"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_color_nicks_in_names = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "color_nicks_in_names", "boolean",
+ N_("use nick color in output of /names (or list of nicks displayed "
+ "when joining a channel)"),
+ NULL, 0, 0, "off", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_color_nicks_in_nicklist = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "color_nicks_in_nicklist", "boolean",
+ N_("use nick color in nicklist"),
+ NULL, 0, 0, "off", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_look_color_nicks_in_nicklist, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_look_color_nicks_in_server_messages = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "color_nicks_in_server_messages", "boolean",
+ N_("use nick color in messages from server"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_color_pv_nick_like_channel = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "color_pv_nick_like_channel", "boolean",
+ N_("use same nick color for channel and private"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_ctcp_time_format = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "ctcp_time_format", "string",
+ N_("time format used in answer to message CTCP TIME (see man "
+ "strftime for date/time specifiers)"),
+ NULL, 0, 0, "%a, %d %b %Y %T %z", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_display_account_message = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "display_account_message", "boolean",
+ N_("display ACCOUNT messages received when capability account-notify "
+ "is enabled"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_display_away = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "display_away", "integer",
+ N_("display message when (un)marking as away (off: do not "
+ "display/send anything, local: display locally, channel: send "
+ "action to channels)"),
+ "off|local|channel", 0, 0, "local", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_look_display_away, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_look_display_ctcp_blocked = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "display_ctcp_blocked", "boolean",
+ N_("display CTCP message even if it is blocked"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_display_ctcp_reply = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "display_ctcp_reply", "boolean",
+ N_("display CTCP reply sent by WeeChat"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_display_ctcp_unknown = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "display_ctcp_unknown", "boolean",
+ N_("display CTCP message even if it is unknown CTCP"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_display_extended_join = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "display_extended_join", "boolean",
+ N_("display extra information in the JOIN messages: account name "
+ "and real name (capability extended-join must be enabled)"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_display_host_join = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "display_host_join", "boolean",
+ N_("display host in join messages"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_display_host_join_local = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "display_host_join_local", "boolean",
+ N_("display host in join messages from local client"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_display_host_quit = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "display_host_quit", "boolean",
+ N_("display host in part/quit messages"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_display_join_message = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "display_join_message", "string",
+ N_("comma-separated list of messages to display after joining a "
+ "channel: 324 = channel modes, 329 = channel creation date, "
+ "332 = topic, 333 = nick/date for topic, 353 = names on channel, "
+ "366 = names count"),
+ NULL, 0, 0, "329,332,333,366", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_look_display_join_message, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_look_display_old_topic = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "display_old_topic", "boolean",
+ N_("display old topic when channel topic is changed"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_display_pv_away_once = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "display_pv_away_once", "boolean",
+ N_("display remote away message only once in private"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_display_pv_back = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "display_pv_back", "boolean",
+ N_("display a message in private when user is back (after quit on "
+ "server)"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_display_pv_nick_change = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "display_pv_nick_change", "boolean",
+ N_("display nick change in private"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_display_pv_warning_address = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "display_pv_warning_address", "boolean",
+ N_("display a warning in private buffer if the address of remote "
+ "nick has changed; this option is disabled by default because "
+ "servers like bitlbee are causing this warning to be displayed "
+ "when it is not expected (the address of remote nick changes "
+ "multiple times on login)"),
+ NULL, 0, 0, "off", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_highlight_channel = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "highlight_channel", "string",
+ N_("comma separated list of words to highlight in channel buffers "
+ "(case insensitive, use \"(?-i)\" at beginning of words to "
+ "make them case sensitive; special variables $nick, $channel and "
+ "$server are replaced by their values), these words are added to "
+ "buffer property \"highlight_words\" only when buffer is created "
+ "(it does not affect current buffers), an empty string disables "
+ "default highlight on nick, examples: \"$nick\", \"(?-i)$nick\""),
+ NULL, 0, 0, "$nick", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_highlight_pv = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "highlight_pv", "string",
+ N_("comma separated list of words to highlight in private buffers "
+ "(case insensitive, use \"(?-i)\" at beginning of words to "
+ "make them case sensitive; special variables $nick, $channel and "
+ "$server are replaced by their values), these words are added to "
+ "buffer property \"highlight_words\" only when buffer is created "
+ "(it does not affect current buffers), an empty string disables "
+ "default highlight on nick, examples: \"$nick\", \"(?-i)$nick\""),
+ NULL, 0, 0, "$nick", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_highlight_server = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "highlight_server", "string",
+ N_("comma separated list of words to highlight in server buffers "
+ "(case insensitive, use \"(?-i)\" at beginning of words to "
+ "make them case sensitive; special variables $nick, $channel and "
+ "$server are replaced by their values), these words are added to "
+ "buffer property \"highlight_words\" only when buffer is created "
+ "(it does not affect current buffers), an empty string disables "
+ "default highlight on nick, examples: \"$nick\", \"(?-i)$nick\""),
+ NULL, 0, 0, "$nick", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_highlight_tags_restrict = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "highlight_tags_restrict", "string",
+ N_("restrict highlights to these tags on irc buffers (to have "
+ "highlight on user messages but not server messages); tags "
+ "must be separated by a comma and \"+\" can be used to make a "
+ "logical \"and\" between tags; wildcard \"*\" is allowed in tags; "
+ "an empty value allows highlight on any tag"),
+ NULL, 0, 0, "irc_privmsg,irc_notice", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_look_highlight_tags_restrict, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_look_item_channel_modes_hide_args = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "item_channel_modes_hide_args", "string",
+ N_("hide channel modes arguments if at least one of these modes is "
+ "in channel modes (\"*\" to always hide all arguments, empty "
+ "value to never hide arguments); example: \"kf\" to hide "
+ "arguments if \"k\" or \"f\" are in channel modes"),
+ NULL, 0, 0, "k", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_look_item_channel_modes_hide_args, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_look_item_display_server = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "item_display_server", "integer",
+ N_("name of bar item where IRC server is displayed (for status bar)"),
+ "buffer_plugin|buffer_name", 0, 0, "buffer_plugin", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_look_item_display_server, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_look_item_nick_modes = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "item_nick_modes", "boolean",
+ N_("display nick modes in bar item \"input_prompt\""),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_bar_item_input_prompt, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_look_item_nick_prefix = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "item_nick_prefix", "boolean",
+ N_("display nick prefix in bar item \"input_prompt\""),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_bar_item_input_prompt, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_look_join_auto_add_chantype = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "join_auto_add_chantype", "boolean",
+ N_("automatically add channel type in front of channel name on "
+ "command /join if the channel name does not start with a valid "
+ "channel type for the server; for example: \"/join weechat\" "
+ "will in fact send: \"/join #weechat\""),
+ NULL, 0, 0, "off", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_msgbuffer_fallback = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "msgbuffer_fallback", "integer",
+ N_("default target buffer for msgbuffer options when target is "
+ "private and that private buffer is not found"),
+ "current|server", 0, 0, "current", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_new_channel_position = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "new_channel_position", "integer",
+ N_("force position of new channel in list of buffers "
+ "(none = default position (should be last buffer), "
+ "next = current buffer + 1, near_server = after last channel/pv "
+ "of server)"),
+ "none|next|near_server", 0, 0, "none", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_new_pv_position = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "new_pv_position", "integer",
+ N_("force position of new private in list of buffers "
+ "(none = default position (should be last buffer), "
+ "next = current buffer + 1, near_server = after last channel/pv "
+ "of server)"),
+ "none|next|near_server", 0, 0, "none", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_nick_completion_smart = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "nick_completion_smart", "integer",
+ N_("smart completion for nicks (completes first with last speakers): "
+ "speakers = all speakers (including highlights), "
+ "speakers_highlights = only speakers with highlight"),
+ "off|speakers|speakers_highlights", 0, 0, "speakers", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_nick_mode = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "nick_mode", "integer",
+ N_("display nick mode (op, voice, ...) before nick (none = never, "
+ "prefix = in prefix only (default), action = in action messages "
+ "only, both = prefix + action messages)"),
+ "none|prefix|action|both", 0, 0, "prefix", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_nick_mode_empty = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "nick_mode_empty", "boolean",
+ N_("display a space if nick mode is enabled but nick has no mode "
+ "(not op, voice, ...)"),
+ NULL, 0, 0, "off", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_bar_item_input_prompt, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_look_nicks_hide_password = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "nicks_hide_password", "string",
+ N_("comma separated list of nicks for which passwords will be "
+ "hidden when a message is sent, for example to hide password "
+ "in message displayed by \"/msg nickserv identify password\", "
+ "example: \"nickserv,nickbot\""),
+ NULL, 0, 0, "nickserv", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_look_nicks_hide_password, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_look_notice_as_pv = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "notice_as_pv", "integer",
+ N_("display notices as private messages (if auto, use private "
+ "buffer if found)"),
+ "auto|never|always", 0, 0, "auto", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_notice_welcome_redirect = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "notice_welcome_redirect", "boolean",
+ N_("automatically redirect channel welcome notices to the channel "
+ "buffer; such notices have the nick as target but a channel name "
+ "in beginning of notice message, for example the ENTRYMSG "
+ "notices sent by Atheme IRC Services which look like: "
+ "\"[#channel] Welcome to this channel...\""),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_notice_welcome_tags = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "notice_welcome_tags", "string",
+ N_("comma separated list of tags used in a welcome notices "
+ "redirected to a channel, for example: \"notify_private\""),
+ NULL, 0, 0, "", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_notify_tags_ison = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "notify_tags_ison", "string",
+ N_("comma separated list of tags used in messages displayed by "
+ "notify when a nick joins or quits server (result of command "
+ "ison or monitor), for example: \"notify_message\", "
+ "\"notify_private\" or \"notify_highlight\""),
+ NULL, 0, 0, "notify_message", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_notify_tags_whois = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "notify_tags_whois", "string",
+ N_("comma separated list of tags used in messages displayed by "
+ "notify when a nick away status changes (result of command "
+ "whois), for example: \"notify_message\", \"notify_private\" or "
+ "\"notify_highlight\""),
+ NULL, 0, 0, "notify_message", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_part_closes_buffer = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "part_closes_buffer", "boolean",
+ N_("close buffer when /part is issued on a channel"),
+ NULL, 0, 0, "off", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_pv_buffer = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "pv_buffer", "integer",
+ N_("merge private buffers"),
+ "independent|merge_by_server|merge_all", 0, 0, "independent", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_look_pv_buffer, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_look_pv_tags = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "pv_tags", "string",
+ N_("comma separated list of tags used in private messages, for "
+ "example: \"notify_message\", \"notify_private\" or "
+ "\"notify_highlight\""),
+ NULL, 0, 0, "notify_private", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_raw_messages = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "raw_messages", "integer",
+ N_("number of raw messages to save in memory when raw data buffer "
+ "is closed (messages will be displayed when opening raw data "
+ "buffer)"),
+ NULL, 0, 65535, "256", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_typing_status_nicks = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "typing_status_nicks", "boolean",
+ N_("display nicks typing on the channel in bar item \"typing\" "
+ "(option typing.look.enabled_nicks must be enabled and "
+ "capability \"message-tags\" must be enabled on the server)"),
+ NULL, 0, 0, "off", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_typing_status_self = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "typing_status_self", "boolean",
+ N_("send self typing status to channels so that other users see "
+ "when you are typing a message "
+ "(option typing.look.enabled_self must be enabled and capability "
+ "\"message-tags\" must be enabled on the server)"),
+ NULL, 0, 0, "off", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_server_buffer = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "server_buffer", "integer",
+ N_("merge server buffers; this option has no effect if a layout "
+ "is saved and is conflicting with this value (see /help layout)"),
+ "merge_with_core|merge_without_core|independent", 0, 0, "merge_with_core",
+ NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_look_server_buffer, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_look_smart_filter = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "smart_filter", "boolean",
+ N_("filter join/part/quit/nick messages for a nick if not speaking "
+ "for some minutes on channel (you must create a filter on tag "
+ "\"irc_smart_filter\", see /help filter)"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_smart_filter_account = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "smart_filter_account", "boolean",
+ /* TRANSLATORS: please do not translate "account" */
+ N_("enable smart filter for \"account\" messages"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_smart_filter_chghost = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "smart_filter_chghost", "boolean",
+ /* TRANSLATORS: please do not translate "chghost" */
+ N_("enable smart filter for \"chghost\" messages"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_smart_filter_delay = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "smart_filter_delay", "integer",
+ N_("delay for filtering join/part/quit messages (in minutes): if "
+ "the nick did not speak during the last N minutes, the "
+ "join/part/quit is filtered"),
+ NULL, 1, 60*24*7, "5", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_smart_filter_join = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "smart_filter_join", "boolean",
+ /* TRANSLATORS: please do not translate "join" */
+ N_("enable smart filter for \"join\" messages"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_smart_filter_join_unmask = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "smart_filter_join_unmask", "integer",
+ N_("delay for unmasking a join message that was filtered with tag "
+ "\"irc_smart_filter\" (in minutes): if a nick has joined max N "
+ "minutes ago and then says something on channel (message, "
+ "notice or update on topic), the join is unmasked, as well as "
+ "nick changes after this join (0 = disable: never unmask a "
+ "join)"),
+ NULL, 0, 60*24*7, "30", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_smart_filter_mode = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "smart_filter_mode", "string",
+ /* TRANSLATORS: please do not translate "mode" */
+ N_("enable smart filter for \"mode\" messages: \"*\" to filter all "
+ "modes, \"+\" to filter all modes in server prefixes (for example "
+ "\"ovh\"), \"xyz\" to filter only modes x/y/z, \"-xyz\" to filter "
+ "all modes but not x/y/z; examples: \"ovh\": filter modes o/v/h, "
+ "\"-bkl\": filter all modes but not b/k/l"),
+ NULL, 0, 0, "+", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_smart_filter_nick = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "smart_filter_nick", "boolean",
+ /* TRANSLATORS: please do not translate "nick" */
+ N_("enable smart filter for \"nick\" messages (nick changes)"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_smart_filter_quit = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "smart_filter_quit", "boolean",
+ /* TRANSLATORS: please do not translate "part" and "quit" */
+ N_("enable smart filter for \"part\" and \"quit\" messages"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_smart_filter_setname = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "smart_filter_setname", "boolean",
+ /* TRANSLATORS: please do not translate "setname" */
+ N_("enable smart filter for \"setname\" messages"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_temporary_servers = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "temporary_servers", "boolean",
+ N_("enable automatic addition of temporary servers with command "
+ "/connect"),
+ NULL, 0, 0, "off", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_topic_strip_colors = weechat_config_new_option (
+ irc_config_file, irc_config_section_look,
+ "topic_strip_colors", "boolean",
+ N_("strip colors in topic (used only when displaying buffer title)"),
+ NULL, 0, 0, "off", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_look_topic_strip_colors, NULL, NULL,
+ NULL, NULL, NULL);
}
- irc_config_color_input_nick = weechat_config_new_option (
- irc_config_file, ptr_section,
- "input_nick", "color",
- N_("color for nick in input bar"),
- NULL, -1, 0, "lightcyan", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_bar_item_input_prompt, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_color_item_channel_modes = weechat_config_new_option (
- irc_config_file, ptr_section,
- "item_channel_modes", "color",
- N_("color for channel modes, near channel name"),
- NULL, -1, 0, "default", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_color_item_channel_modes, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_color_item_lag_counting = weechat_config_new_option (
- irc_config_file, ptr_section,
- "item_lag_counting", "color",
- N_("color for lag indicator, when counting (pong not received from "
- "server, lag is increasing)"),
- NULL, -1, 0, "default", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_color_item_lag, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_color_item_lag_finished = weechat_config_new_option (
- irc_config_file, ptr_section,
- "item_lag_finished", "color",
- N_("color for lag indicator, when pong has been received from server"),
- NULL, -1, 0, "yellow", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_color_item_lag, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_color_item_nick_modes = weechat_config_new_option (
- irc_config_file, ptr_section,
- "item_nick_modes", "color",
- N_("color for nick modes in bar item \"input_prompt\""),
- NULL, -1, 0, "default", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_color_item_nick_modes, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_color_item_tls_version_deprecated = weechat_config_new_option (
- irc_config_file, ptr_section,
- "item_tls_version_deprecated", "color",
- N_("color for deprecated TLS versions in bar item \"tls_version\""),
- NULL, -1, 0, "yellow", NULL, 0,
+ /* color */
+ irc_config_section_color = weechat_config_new_section (
+ irc_config_file, "color",
+ 0, 0,
NULL, NULL, NULL,
- &irc_config_change_color_item_tls_version, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_color_item_tls_version_insecure = weechat_config_new_option (
- irc_config_file, ptr_section,
- "item_tls_version_insecure", "color",
- N_("color for insecure TLS versions in bar item \"tls_version\""),
- NULL, -1, 0, "red", NULL, 0,
NULL, NULL, NULL,
- &irc_config_change_color_item_tls_version, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_color_item_tls_version_ok = weechat_config_new_option (
- irc_config_file, ptr_section,
- "item_tls_version_ok", "color",
- N_("color for higher supported TLS version in bar item \"tls_version\""),
- NULL, -1, 0, "green", NULL, 0,
NULL, NULL, NULL,
- &irc_config_change_color_item_tls_version, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_color_message_account = weechat_config_new_option (
- irc_config_file, ptr_section,
- "message_account", "color",
- N_("color for text in account messages"),
- NULL, -1, 0, "cyan", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_color_message_chghost = weechat_config_new_option (
- irc_config_file, ptr_section,
- "message_chghost", "color",
- /* TRANSLATORS: please do not translate "chghost" */
- N_("color for text in \"chghost\" messages"),
- NULL, -1, 0, "brown", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_color_message_join = weechat_config_new_option (
- irc_config_file, ptr_section,
- "message_join", "color",
- N_("color for text in join messages"),
- NULL, -1, 0, "green", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_color_message_kick = weechat_config_new_option (
- irc_config_file, ptr_section,
- "message_kick", "color",
- N_("color for text in kick/kill messages"),
- NULL, -1, 0, "red", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_color_message_quit = weechat_config_new_option (
- irc_config_file, ptr_section,
- "message_quit", "color",
- N_("color for text in part/quit messages"),
- NULL, -1, 0, "red", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_color_message_setname = weechat_config_new_option (
- irc_config_file, ptr_section,
- "message_setname", "color",
- /* TRANSLATORS: please do not translate "setname" */
- N_("color for text in \"setname\" messages"),
- NULL, -1, 0, "brown", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_color_mirc_remap = weechat_config_new_option (
- irc_config_file, ptr_section,
- "mirc_remap", "string",
- /* TRANSLATORS: please do not translate the list of WeeChat color names at the end of string */
- N_("remap mirc colors in messages using a hashtable: keys are \"fg,bg\" "
- "as integers between -1 (not specified) and 15, values are WeeChat "
- "color names or numbers (format is: \"1,-1:color1;2,7:color2\"), "
- "example: \"1,-1:darkgray;1,2:white,blue\" to remap black to "
- "\"darkgray\" and black on blue to \"white,blue\"; default "
- "WeeChat colors for IRC codes: 0=white, 1=black, 2=blue, 3=green, "
- "4=lightred, 5=red, 6=magenta, 7=brown, 8=yellow, 9=lightgreen, "
- "10=cyan, 11=lightcyan, 12=lightblue, 13=lightmagenta, "
- "14=darkgray, 15=gray"),
- NULL, 0, 0, "1,-1:darkgray", NULL, 0,
NULL, NULL, NULL,
- &irc_config_change_color_mirc_remap, NULL, NULL,
NULL, NULL, NULL);
- irc_config_color_nick_prefixes = weechat_config_new_option (
- irc_config_file, ptr_section,
- "nick_prefixes", "string",
- N_("color for nick prefixes using mode char (o=op, h=halfop, v=voice, "
- "..), format is: \"o:color1;h:color2;v:color3\" (if a mode is not "
- "found, WeeChat will try with next modes received from server "
- "(\"PREFIX\"); a special mode \"*\" can be used as default color "
- "if no mode has been found in list)"),
- NULL, 0, 0, "y:lightred;q:lightred;a:lightcyan;o:lightgreen;"
- "h:lightmagenta;v:yellow;*:lightblue", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_color_nick_prefixes, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_color_notice = weechat_config_new_option (
- irc_config_file, ptr_section,
- "notice", "color",
- N_("color for text \"Notice\" in notices"),
- NULL, -1, 0, "green", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_color_reason_kick = weechat_config_new_option (
- irc_config_file, ptr_section,
- "reason_kick", "color",
- N_("color for reason in kick/kill messages"),
- NULL, -1, 0, "default", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_color_reason_quit = weechat_config_new_option (
- irc_config_file, ptr_section,
- "reason_quit", "color",
- N_("color for reason in part/quit messages"),
- NULL, -1, 0, "default", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_color_topic_current = weechat_config_new_option (
- irc_config_file, ptr_section,
- "topic_current", "color",
- N_("color for current channel topic (when joining a channel or "
- "using /topic)"),
- NULL, -1, 0, "default", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_color_topic_new = weechat_config_new_option (
- irc_config_file, ptr_section,
- "topic_new", "color",
- N_("color for new channel topic (when topic is changed)"),
- NULL, -1, 0, "white", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_color_topic_old = weechat_config_new_option (
- irc_config_file, ptr_section,
- "topic_old", "color",
- N_("color for old channel topic (when topic is changed)"),
- NULL, -1, 0, "default", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-
- /* network */
- ptr_section = weechat_config_new_section (irc_config_file, "network",
- 0, 0,
- NULL, NULL, NULL,
- NULL, NULL, NULL,
- NULL, NULL, NULL,
- NULL, NULL, NULL,
- NULL, NULL, NULL);
- if (!ptr_section)
+ if (irc_config_section_color)
{
- weechat_config_free (irc_config_file);
- irc_config_file = NULL;
- return 0;
+ irc_config_color_input_nick = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "input_nick", "color",
+ N_("color for nick in input bar"),
+ NULL, -1, 0, "lightcyan", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_bar_item_input_prompt, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_color_item_channel_modes = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "item_channel_modes", "color",
+ N_("color for channel modes, near channel name"),
+ NULL, -1, 0, "default", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_color_item_channel_modes, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_color_item_lag_counting = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "item_lag_counting", "color",
+ N_("color for lag indicator, when counting (pong not received from "
+ "server, lag is increasing)"),
+ NULL, -1, 0, "default", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_color_item_lag, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_color_item_lag_finished = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "item_lag_finished", "color",
+ N_("color for lag indicator, when pong has been received from server"),
+ NULL, -1, 0, "yellow", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_color_item_lag, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_color_item_nick_modes = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "item_nick_modes", "color",
+ N_("color for nick modes in bar item \"input_prompt\""),
+ NULL, -1, 0, "default", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_color_item_nick_modes, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_color_item_tls_version_deprecated = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "item_tls_version_deprecated", "color",
+ N_("color for deprecated TLS versions in bar item \"tls_version\""),
+ NULL, -1, 0, "yellow", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_color_item_tls_version, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_color_item_tls_version_insecure = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "item_tls_version_insecure", "color",
+ N_("color for insecure TLS versions in bar item \"tls_version\""),
+ NULL, -1, 0, "red", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_color_item_tls_version, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_color_item_tls_version_ok = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "item_tls_version_ok", "color",
+ N_("color for higher supported TLS version in bar item "
+ "\"tls_version\""),
+ NULL, -1, 0, "green", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_color_item_tls_version, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_color_message_account = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "message_account", "color",
+ N_("color for text in account messages"),
+ NULL, -1, 0, "cyan", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_color_message_chghost = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "message_chghost", "color",
+ /* TRANSLATORS: please do not translate "chghost" */
+ N_("color for text in \"chghost\" messages"),
+ NULL, -1, 0, "brown", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_color_message_join = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "message_join", "color",
+ N_("color for text in join messages"),
+ NULL, -1, 0, "green", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_color_message_kick = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "message_kick", "color",
+ N_("color for text in kick/kill messages"),
+ NULL, -1, 0, "red", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_color_message_quit = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "message_quit", "color",
+ N_("color for text in part/quit messages"),
+ NULL, -1, 0, "red", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_color_message_setname = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "message_setname", "color",
+ /* TRANSLATORS: please do not translate "setname" */
+ N_("color for text in \"setname\" messages"),
+ NULL, -1, 0, "brown", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_color_mirc_remap = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "mirc_remap", "string",
+ /* TRANSLATORS: please do not translate the list of WeeChat color names at the end of string */
+ N_("remap mirc colors in messages using a hashtable: keys are "
+ "\"fg,bg\" as integers between -1 (not specified) and 15, "
+ "values are WeeChat color names or numbers (format is: "
+ "\"1,-1:color1;2,7:color2\"), example: "
+ "\"1,-1:darkgray;1,2:white,blue\" to remap black to "
+ "\"darkgray\" and black on blue to \"white,blue\"; default "
+ "WeeChat colors for IRC codes: 0=white, 1=black, 2=blue, "
+ "3=green, 4=lightred, 5=red, 6=magenta, 7=brown, 8=yellow, "
+ "9=lightgreen, 10=cyan, 11=lightcyan, 12=lightblue, "
+ "13=lightmagenta, 14=darkgray, 15=gray"),
+ NULL, 0, 0, "1,-1:darkgray", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_color_mirc_remap, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_color_nick_prefixes = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "nick_prefixes", "string",
+ N_("color for nick prefixes using mode char (o=op, h=halfop, "
+ "v=voice, ..), format is: \"o:color1;h:color2;v:color3\" (if a "
+ "mode is not found, WeeChat will try with next modes received "
+ "from server (\"PREFIX\"); a special mode \"*\" can be used as "
+ "default color if no mode has been found in list)"),
+ NULL, 0, 0, "y:lightred;q:lightred;a:lightcyan;o:lightgreen;"
+ "h:lightmagenta;v:yellow;*:lightblue", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_color_nick_prefixes, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_color_notice = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "notice", "color",
+ N_("color for text \"Notice\" in notices"),
+ NULL, -1, 0, "green", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_color_reason_kick = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "reason_kick", "color",
+ N_("color for reason in kick/kill messages"),
+ NULL, -1, 0, "default", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_color_reason_quit = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "reason_quit", "color",
+ N_("color for reason in part/quit messages"),
+ NULL, -1, 0, "default", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_color_topic_current = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "topic_current", "color",
+ N_("color for current channel topic (when joining a channel or "
+ "using /topic)"),
+ NULL, -1, 0, "default", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_color_topic_new = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "topic_new", "color",
+ N_("color for new channel topic (when topic is changed)"),
+ NULL, -1, 0, "white", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_color_topic_old = weechat_config_new_option (
+ irc_config_file, irc_config_section_color,
+ "topic_old", "color",
+ N_("color for old channel topic (when topic is changed)"),
+ NULL, -1, 0, "default", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
}
- irc_config_network_autoreconnect_delay_growing = weechat_config_new_option (
- irc_config_file, ptr_section,
- "autoreconnect_delay_growing", "integer",
- N_("growing factor for autoreconnect delay to server (1 = always same "
- "delay, 2 = delay*2 for each retry, etc.)"),
- NULL, 1, 100, "2", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_network_autoreconnect_delay_max = weechat_config_new_option (
- irc_config_file, ptr_section,
- "autoreconnect_delay_max", "integer",
- N_("maximum autoreconnect delay to server (in seconds, 0 = no maximum)"),
- NULL, 0, 3600 * 24 * 7, "600", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_network_ban_mask_default = weechat_config_new_option (
- irc_config_file, ptr_section,
- "ban_mask_default", "string",
- N_("default ban mask for commands /ban, /unban and /kickban; variables "
- "$nick, $user, $ident and $host are replaced by their values "
- "(extracted from \"nick!user@host\"); $ident is the same as $user if "
- "$user does not start with \"~\", otherwise it is set to \"*\"; this "
- "default mask is used only if WeeChat knows the host for the nick"),
- NULL, 0, 0, "*!$ident@$host", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_network_colors_receive = weechat_config_new_option (
- irc_config_file, ptr_section,
- "colors_receive", "boolean",
- N_("when off, colors codes are ignored in incoming messages"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_network_colors_send = weechat_config_new_option (
- irc_config_file, ptr_section,
- "colors_send", "boolean",
- N_("allow user to send colors with special codes (ctrl-c + a code and "
- "optional color: b=bold, cxx=color, cxx,yy=color+background, "
- "i=italic, o=disable color/attributes, r=reverse, u=underline)"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_network_lag_check = weechat_config_new_option (
- irc_config_file, ptr_section,
- "lag_check", "integer",
- N_("interval between two checks for lag (in seconds, 0 = never "
- "check)"),
- NULL, 0, 3600 * 24 * 7, "60", NULL, 0,
- NULL, NULL, NULL,
- &irc_config_change_network_lag_check, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_network_lag_max = weechat_config_new_option (
- irc_config_file, ptr_section,
- "lag_max", "integer",
- N_("maximum lag (in seconds): if this lag is reached, WeeChat will "
- "consider that the answer from server (pong) will never be received "
- "and will give up counting the lag (0 = never give up)"),
- NULL, 0, 3600 * 24 * 7, "1800", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_network_lag_min_show = weechat_config_new_option (
- irc_config_file, ptr_section,
- "lag_min_show", "integer",
- N_("minimum lag to show (in milliseconds)"),
- NULL, 0, 1000 * 3600 * 24, "500", NULL, 0,
+ /* network */
+ irc_config_section_network = weechat_config_new_section (
+ irc_config_file, "network",
+ 0, 0,
NULL, NULL, NULL,
- &irc_config_change_network_lag_min_show, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_network_lag_reconnect = weechat_config_new_option (
- irc_config_file, ptr_section,
- "lag_reconnect", "integer",
- N_("reconnect to server if lag is greater than or equal to this value "
- "(in seconds, 0 = never reconnect); this value must be less than or "
- "equal to irc.network.lag_max"),
- NULL, 0, 3600 * 24 * 7, "300", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_network_lag_refresh_interval = weechat_config_new_option (
- irc_config_file, ptr_section,
- "lag_refresh_interval", "integer",
- N_("interval between two refreshes of lag item, when lag is "
- "increasing (in seconds)"),
- NULL, 1, 3600, "1", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_network_notify_check_ison = weechat_config_new_option (
- irc_config_file, ptr_section,
- "notify_check_ison", "integer",
- N_("interval between two checks for notify with IRC command \"ison\" "
- "(in minutes)"),
- NULL, 1, 60 * 24 * 7, "1", NULL, 0,
NULL, NULL, NULL,
- &irc_config_change_network_notify_check_ison, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_network_notify_check_whois = weechat_config_new_option (
- irc_config_file, ptr_section,
- "notify_check_whois", "integer",
- N_("interval between two checks for notify with IRC command \"whois\" "
- "(in minutes)"),
- NULL, 1, 60 * 24 * 7, "5", NULL, 0,
NULL, NULL, NULL,
- &irc_config_change_network_notify_check_whois, NULL, NULL,
- NULL, NULL, NULL);
- irc_config_network_sasl_fail_unavailable = weechat_config_new_option (
- irc_config_file, ptr_section,
- "sasl_fail_unavailable", "boolean",
- N_("cause SASL authentication failure when SASL is requested but "
- "unavailable on the server; when this option is enabled, it has "
- "effect only if option \"sasl_fail\" is set to \"reconnect\" or "
- "\"disconnect\" in the server"),
- NULL, 0, 0, "on", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- irc_config_network_send_unknown_commands = weechat_config_new_option (
- irc_config_file, ptr_section,
- "send_unknown_commands", "boolean",
- N_("send unknown commands to server"),
- NULL, 0, 0, "off", NULL, 0,
NULL, NULL, NULL,
- &irc_config_change_network_send_unknown_commands, NULL, NULL,
NULL, NULL, NULL);
- irc_config_network_whois_double_nick = weechat_config_new_option (
- irc_config_file, ptr_section,
- "whois_double_nick", "boolean",
- N_("double the nick in /whois command (if only one nick is given), to "
- "get idle time in answer; for example: \"/whois nick\" will send "
- "\"whois nick nick\""),
- NULL, 0, 0, "off", NULL, 0,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ if (irc_config_section_network)
+ {
+ irc_config_network_autoreconnect_delay_growing = weechat_config_new_option (
+ irc_config_file, irc_config_section_network,
+ "autoreconnect_delay_growing", "integer",
+ N_("growing factor for autoreconnect delay to server (1 = always "
+ "same delay, 2 = delay*2 for each retry, etc.)"),
+ NULL, 1, 100, "2", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_network_autoreconnect_delay_max = weechat_config_new_option (
+ irc_config_file, irc_config_section_network,
+ "autoreconnect_delay_max", "integer",
+ N_("maximum autoreconnect delay to server (in seconds, 0 = no "
+ "maximum)"),
+ NULL, 0, 3600 * 24 * 7, "600", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_network_ban_mask_default = weechat_config_new_option (
+ irc_config_file, irc_config_section_network,
+ "ban_mask_default", "string",
+ N_("default ban mask for commands /ban, /unban and /kickban; "
+ "variables $nick, $user, $ident and $host are replaced by their "
+ "values (extracted from \"nick!user@host\"); $ident is the same "
+ "as $user if $user does not start with \"~\", otherwise it is "
+ "set to \"*\"; this default mask is used only if WeeChat knows "
+ "the host for the nick"),
+ NULL, 0, 0, "*!$ident@$host", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_network_colors_receive = weechat_config_new_option (
+ irc_config_file, irc_config_section_network,
+ "colors_receive", "boolean",
+ N_("when off, colors codes are ignored in incoming messages"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_network_colors_send = weechat_config_new_option (
+ irc_config_file, irc_config_section_network,
+ "colors_send", "boolean",
+ N_("allow user to send colors with special codes (ctrl-c + a code "
+ "and optional color: b=bold, cxx=color, cxx,yy=color+background, "
+ "i=italic, o=disable color/attributes, r=reverse, u=underline)"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_network_lag_check = weechat_config_new_option (
+ irc_config_file, irc_config_section_network,
+ "lag_check", "integer",
+ N_("interval between two checks for lag (in seconds, 0 = never "
+ "check)"),
+ NULL, 0, 3600 * 24 * 7, "60", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_network_lag_check, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_network_lag_max = weechat_config_new_option (
+ irc_config_file, irc_config_section_network,
+ "lag_max", "integer",
+ N_("maximum lag (in seconds): if this lag is reached, WeeChat will "
+ "consider that the answer from server (pong) will never be "
+ "received and will give up counting the lag (0 = never give up)"),
+ NULL, 0, 3600 * 24 * 7, "1800", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_network_lag_min_show = weechat_config_new_option (
+ irc_config_file, irc_config_section_network,
+ "lag_min_show", "integer",
+ N_("minimum lag to show (in milliseconds)"),
+ NULL, 0, 1000 * 3600 * 24, "500", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_network_lag_min_show, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_network_lag_reconnect = weechat_config_new_option (
+ irc_config_file, irc_config_section_network,
+ "lag_reconnect", "integer",
+ N_("reconnect to server if lag is greater than or equal to this "
+ "value (in seconds, 0 = never reconnect); this value must be "
+ "less than or equal to irc.network.lag_max"),
+ NULL, 0, 3600 * 24 * 7, "300", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_network_lag_refresh_interval = weechat_config_new_option (
+ irc_config_file, irc_config_section_network,
+ "lag_refresh_interval", "integer",
+ N_("interval between two refreshes of lag item, when lag is "
+ "increasing (in seconds)"),
+ NULL, 1, 3600, "1", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_network_notify_check_ison = weechat_config_new_option (
+ irc_config_file, irc_config_section_network,
+ "notify_check_ison", "integer",
+ N_("interval between two checks for notify with IRC command "
+ "\"ison\" (in minutes)"),
+ NULL, 1, 60 * 24 * 7, "1", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_network_notify_check_ison, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_network_notify_check_whois = weechat_config_new_option (
+ irc_config_file, irc_config_section_network,
+ "notify_check_whois", "integer",
+ N_("interval between two checks for notify with IRC command "
+ "\"whois\" (in minutes)"),
+ NULL, 1, 60 * 24 * 7, "5", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_network_notify_check_whois, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_network_sasl_fail_unavailable = weechat_config_new_option (
+ irc_config_file, irc_config_section_network,
+ "sasl_fail_unavailable", "boolean",
+ N_("cause SASL authentication failure when SASL is requested but "
+ "unavailable on the server; when this option is enabled, it has "
+ "effect only if option \"sasl_fail\" is set to \"reconnect\" or "
+ "\"disconnect\" in the server"),
+ NULL, 0, 0, "on", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_network_send_unknown_commands = weechat_config_new_option (
+ irc_config_file, irc_config_section_network,
+ "send_unknown_commands", "boolean",
+ N_("send unknown commands to server"),
+ NULL, 0, 0, "off", NULL, 0,
+ NULL, NULL, NULL,
+ &irc_config_change_network_send_unknown_commands, NULL, NULL,
+ NULL, NULL, NULL);
+ irc_config_network_whois_double_nick = weechat_config_new_option (
+ irc_config_file, irc_config_section_network,
+ "whois_double_nick", "boolean",
+ N_("double the nick in /whois command (if only one nick is given), "
+ "to get idle time in answer; for example: \"/whois nick\" will "
+ "send \"whois nick nick\""),
+ NULL, 0, 0, "off", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ }
/* msgbuffer */
- ptr_section = weechat_config_new_section (
+ irc_config_section_msgbuffer = weechat_config_new_section (
irc_config_file, "msgbuffer",
1, 1,
NULL, NULL, NULL,
@@ -3634,16 +3641,9 @@ irc_config_init ()
NULL, NULL, NULL,
&irc_config_msgbuffer_create_option, NULL, NULL,
NULL, NULL, NULL);
- if (!ptr_section)
- {
- weechat_config_free (irc_config_file);
- irc_config_file = NULL;
- return 0;
- }
- irc_config_section_msgbuffer = ptr_section;
/* CTCP */
- ptr_section = weechat_config_new_section (
+ irc_config_section_ctcp = weechat_config_new_section (
irc_config_file, "ctcp",
1, 1,
NULL, NULL, NULL,
@@ -3651,16 +3651,9 @@ irc_config_init ()
NULL, NULL, NULL,
&irc_config_ctcp_create_option, NULL, NULL,
NULL, NULL, NULL);
- if (!ptr_section)
- {
- weechat_config_free (irc_config_file);
- irc_config_file = NULL;
- return 0;
- }
- irc_config_section_ctcp = ptr_section;
/* ignore */
- ptr_section = weechat_config_new_section (
+ irc_config_section_ignore = weechat_config_new_section (
irc_config_file, "ignore",
0, 0,
&irc_config_ignore_read_cb, NULL, NULL,
@@ -3668,15 +3661,9 @@ irc_config_init ()
&irc_config_ignore_write_cb, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
- if (!ptr_section)
- {
- weechat_config_free (irc_config_file);
- irc_config_file = NULL;
- return 0;
- }
/* server_default */
- ptr_section = weechat_config_new_section (
+ irc_config_section_server_default = weechat_config_new_section (
irc_config_file, "server_default",
0, 0,
NULL, NULL, NULL,
@@ -3684,18 +3671,11 @@ irc_config_init ()
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
- if (!ptr_section)
- {
- weechat_config_free (irc_config_file);
- irc_config_file = NULL;
- return 0;
- }
- irc_config_section_server_default = ptr_section;
- irc_config_server_create_default_options (ptr_section);
+ irc_config_server_create_default_options (irc_config_section_server_default);
/* server */
- ptr_section = weechat_config_new_section (
+ irc_config_section_server = weechat_config_new_section (
irc_config_file, "server",
0, 0,
&irc_config_server_read_cb, NULL, NULL,
@@ -3703,13 +3683,6 @@ irc_config_init ()
NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
- if (!ptr_section)
- {
- weechat_config_free (irc_config_file);
- irc_config_file = NULL;
- return 0;
- }
- irc_config_section_server = ptr_section;
irc_config_hook_config_nick_color_options = weechat_hook_config (
"weechat.look.nick_color_*",