1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 22:06:38 +02:00

Add function "config_is_set_plugin" in plugin/script API

This commit is contained in:
Sebastien Helleu
2009-05-17 15:49:58 +02:00
parent 1076183317
commit 353538e3d8
14 changed files with 403 additions and 51 deletions
+20
View File
@@ -124,6 +124,26 @@ plugin_api_config_get_plugin (struct t_weechat_plugin *plugin,
return NULL;
}
/*
* plugin_api_config_is_set_plugin: return 1 if plugin option is set, otherwise 0
*/
int
plugin_api_config_is_set_plugin (struct t_weechat_plugin *plugin,
const char *option_name)
{
struct t_config_option *ptr_option;
if (!plugin || !option_name)
return 0;
ptr_option = plugin_config_search (plugin->name, option_name);
if (ptr_option)
return 1;
return 0;
}
/*
* plugin_api_config_set_plugin: set value of a plugin config option
*/