summaryrefslogtreecommitdiff
path: root/doc/en
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-03-20 21:51:13 +0100
committerSébastien Helleu <flashcode@flashtux.org>2018-03-20 21:51:13 +0100
commit667c9364ed1c1e36a555e9a54236a8d1b3df098d (patch)
tree381becd371b7d5133b003703847375059e94b29b /doc/en
parent4238fe0e9ce13c7b11b238e8f470632aa1b96f5f (diff)
downloadweechat-667c9364ed1c1e36a555e9a54236a8d1b3df098d.zip
doc: add more info about the reload callback in function config_new (plugin API reference)
Diffstat (limited to 'doc/en')
-rw-r--r--doc/en/weechat_plugin_api.en.adoc11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index 642466188..fc440c6c2 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -4988,7 +4988,7 @@ Arguments:
* _name_: name of configuration file (without path or extension)
* _callback_reload_: function called when configuration file is reloaded with
- `/reload` (optional, can be NULL), arguments and return value:
+ `/reload` (optional, can be NULL, see below), arguments and return value:
** _const void *pointer_: pointer
** _void *data_: pointer
** _struct t_config_file *config_file_: configuration file pointer
@@ -5002,6 +5002,15 @@ Arguments:
WeeChat; if not NULL, it must have been allocated with malloc (or similar
function) and it is automatically freed when the configuration file is freed
+Reload callback:
+
+* The callback must only call the function <<_config_reload,config_reload>>,
+ it must not remove the configuration file.
+* A callback is needed only if it does some things before and/or after the
+ call to the function <<_config_reload,config_reload>>. +
+ If no callback is given, WeeChat will call its internal reload function,
+ so the configuration file will be reloaded in all cases.
+
Return value:
* pointer to new configuration file, NULL if an error occurred