summaryrefslogtreecommitdiff
path: root/src/plugins/buflist/buflist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/buflist/buflist.c')
-rw-r--r--src/plugins/buflist/buflist.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/plugins/buflist/buflist.c b/src/plugins/buflist/buflist.c
index 7c98cc7e0..666b8ea64 100644
--- a/src/plugins/buflist/buflist.c
+++ b/src/plugins/buflist/buflist.c
@@ -45,7 +45,20 @@ struct t_hdata *buflist_hdata_hotlist = NULL;
/*
- * Get IRC server and channel pointers for a buffer.
+ * Adds the buflist bar.
+ */
+
+void
+buflist_add_bar ()
+{
+ weechat_bar_new (BUFLIST_BAR_NAME, "off", "0", "root", "", "left",
+ "columns_vertical", "vertical", "0", "0",
+ "default", "default", "default", "on",
+ BUFLIST_BAR_ITEM_NAME);
+}
+
+/*
+ * Gets IRC server and channel pointers for a buffer.
*
* According to buffer:
* - non IRC buffer: both are NULL
@@ -443,10 +456,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
buflist_command_init ();
- weechat_bar_new (BUFLIST_BAR_NAME, "off", "0", "root", "", "left",
- "columns_vertical", "vertical", "0", "0",
- "default", "default", "default", "on",
- BUFLIST_BAR_ITEM_NAME);
+ if (weechat_config_boolean (buflist_config_look_enabled))
+ buflist_add_bar ();
buflist_bar_item_update ();