summaryrefslogtreecommitdiff
path: root/src/common/weeconfig.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-10-15 12:34:21 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-10-15 12:34:21 +0000
commitcdc33d08b0d964a03e45b3582d8ba9b69e682486 (patch)
tree08f3bb88ba2c0ed1348d5b386892d43bab5f9c59 /src/common/weeconfig.c
parent5130b1dc4fd2f2cc50165cd291fc37246c988bec (diff)
downloadweechat-cdc33d08b0d964a03e45b3582d8ba9b69e682486.zip
New plugin interface (loads dynamic C libraries)
Diffstat (limited to 'src/common/weeconfig.c')
-rw-r--r--src/common/weeconfig.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/src/common/weeconfig.c b/src/common/weeconfig.c
index 1840c3951..419161e28 100644
--- a/src/common/weeconfig.c
+++ b/src/common/weeconfig.c
@@ -53,6 +53,7 @@ t_config_section config_sections[CONFIG_NUMBER_SECTIONS] =
{ CONFIG_SECTION_IRC, "irc" },
{ CONFIG_SECTION_DCC, "dcc" },
{ CONFIG_SECTION_PROXY, "proxy" },
+ { CONFIG_SECTION_PLUGINS, "plugins" },
{ CONFIG_SECTION_KEYS, "keys" },
{ CONFIG_SECTION_ALIAS, "alias" },
{ CONFIG_SECTION_IGNORE, "ignore" },
@@ -747,6 +748,36 @@ t_config_option weechat_options_proxy[] =
{ NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
};
+/* config, plugins section */
+
+char *cfg_plugins_path;
+char *cfg_plugins_autoload;
+char *cfg_plugins_extension;
+
+t_config_option weechat_options_plugins[] =
+{ { "plugins_path", N_("path for searching plugins"),
+ N_("path for searching plugins"),
+ OPTION_TYPE_STRING, 0, 0, 0,
+ "~/.weechat/plugins", NULL, NULL, &cfg_plugins_path, config_change_noop },
+ { "plugins_autoload", N_("list of plugins to load automatically"),
+ N_("comma separated list of plugins to load automatically at startup, "
+ "\"*\" means all plugins found "
+ "(names may be partial, for example \"perl\" is ok for \"libperl.so\")"),
+ OPTION_TYPE_STRING, 0, 0, 0,
+ "*", NULL, NULL, &cfg_plugins_autoload, config_change_noop },
+ { "plugins_extension", N_("standard plugins extension in filename"),
+ N_("standard plugins extension in filename, used for autoload "
+ "(if empty, then all files are loaded when autoload is \"*\")"),
+ OPTION_TYPE_STRING, 0, 0, 0,
+#ifdef WIN32
+ ".dll",
+#else
+ ".so",
+#endif
+ NULL, NULL, &cfg_plugins_extension, config_change_noop },
+ { NULL, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL }
+};
+
/* config, server section */
static t_irc_server cfg_server;
@@ -836,7 +867,8 @@ t_config_option weechat_options_server[] =
t_config_option *weechat_options[CONFIG_NUMBER_SECTIONS] =
{ weechat_options_look, weechat_options_colors, weechat_options_history,
weechat_options_log, weechat_options_irc, weechat_options_dcc,
- weechat_options_proxy, NULL, NULL, NULL, weechat_options_server
+ weechat_options_proxy, weechat_options_plugins, NULL, NULL, NULL,
+ weechat_options_server
};