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

Add new option irc.look.buffer_auto_switch_on_join

This commit is contained in:
Sebastien Helleu
2011-03-15 11:51:48 +01:00
parent fdc29b5f49
commit c61254f256
18 changed files with 75 additions and 14 deletions
+3 -1
View File
@@ -283,7 +283,9 @@ irc_channel_new (struct t_irc_server *server, int channel_type,
server->channels = new_channel;
server->last_channel = new_channel;
if (switch_to_channel)
if (switch_to_channel
&& ((channel_type != IRC_CHANNEL_TYPE_CHANNEL)
|| weechat_config_boolean (irc_config_look_buffer_auto_switch_on_join)))
{
weechat_buffer_set (new_buffer, "display",
(auto_switch) ? "auto" : "1");
+8 -1
View File
@@ -50,6 +50,7 @@ struct t_config_section *irc_config_section_server = NULL;
/* IRC config, look section */
struct t_config_option *irc_config_look_buffer_auto_switch_on_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;
@@ -1792,7 +1793,13 @@ irc_config_init ()
weechat_config_free (irc_config_file);
return 0;
}
irc_config_look_buffer_auto_switch_on_join = weechat_config_new_option (
irc_config_file, ptr_section,
"buffer_auto_switch_on_join", "boolean",
N_("auto switch to channel buffer on join"),
NULL, 0, 0, "on", NULL, 0, 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",
+1
View File
@@ -75,6 +75,7 @@ extern struct t_config_section *irc_config_section_ctcp;
extern struct t_config_section *irc_config_section_server_default;
extern struct t_config_section *irc_config_section_server;
extern struct t_config_option *irc_config_look_buffer_auto_switch_on_join;
extern struct t_config_option *irc_config_look_color_nicks_in_names;
extern struct t_config_option *irc_config_look_color_nicks_in_nicklist;
extern struct t_config_option *irc_config_look_color_nicks_in_server_messages;