doc: add description of arguments sent to the weechat_plugin_init plugin function (plugin API reference)

This commit is contained in:
Sébastien Helleu 2019-06-26 21:20:01 +02:00
parent 33ee803609
commit b1ab2a0c50
4 changed files with 113 additions and 10 deletions

View File

@ -94,14 +94,39 @@ Arguments:
* _plugin_: pointer to WeeChat plugin structure, used to initialize the
convenience global pointer `weechat_plugin`
* _argc_: number of arguments for plugin (given on command line by user)
* _argv_: arguments for plugin
* _argc_: number of arguments for plugin
* _argv_: arguments for plugin (see below)
Return value:
* _WEECHAT_RC_OK_ if successful (plugin will be loaded)
* _WEECHAT_RC_ERROR_ if error (plugin will NOT be loaded)
[[plugin_arguments]]
===== Plugin arguments
When the plugin is loaded by WeeChat, it receives the list of arguments
in parameter `argv` and the number of arguments in `argc`.
The arguments can be:
* command line arguments when running the WeeChat binary,
* arguments given to the command `/plugin load xxx`, when the plugin is manually
loaded by the user.
When the arguments come from the command line, only these arguments are sent to
the plugin:
*-a*, *--no-connect*::
Disable auto-connect to servers when WeeChat is starting.
*-s*, *--no-script*::
Disable scripts auto-load.
*plugin:option*::
Option for a plugin: only the plugin-related options are sent, for example
only the options starting with `irc:` are sent to the plugin called "irc".
[[plugin_priority]]
===== Plugin priority

View File

@ -97,15 +97,40 @@ Paramètres :
* _plugin_ : pointeur vers la structure d'extension WeeChat, utilisé pour
initialiser le pointeur global `weechat_plugin`
* _argc_ : nombre de paramètres pour l'extension (donnés sur la ligne de
commande par l'utilisateur)
* _argv_ : paramètres pour l'extension
* _argc_ : nombre de paramètres pour l'extension
* _argv_ : paramètres pour l'extension (voir ci-dessous)
Valeur de retour :
* _WEECHAT_RC_OK_ si ok (l'extension sera chargée)
* _WEECHAT_RC_ERROR_ si erreur (l'extension ne sera PAS chargée)
[[plugin_arguments]]
===== Paramètres de l'extension
Lorsque l'extension est chargée par WeeChat, elle reçoit la liste des
paramètres dans `argv` et le nombre de paramètres dans `argc`.
Les paramètres peuvent être :
* les paramètres de ligne de commande lors du lancement du binaire WeeChat,
* les paramètres donnés à la commande `/plugin load xxx`, lorsque l'extension
est chargée manuellement par l'utilisateur.
Lorsque les paramètres proviennent de la ligne de commande, seulement ces
paramètres sont envoyés à l'extension :
*-a*, *--no-connect*::
Supprimer la connexion automatique aux serveurs lors du démarrage.
*-s*, *--no-script*::
Supprimer le chargement automatique des scripts au démarrage.
*extension:option*::
Option pour une extension : seulement les options liées à l'extension sont
envoyées, par exemple seulement les options démarrant par `irc:` sont
envoyées à l'extension "irc".
[[plugin_priority]]
===== Priorité de l'extension

View File

@ -106,9 +106,9 @@ Argomenti:
// TRANSLATION MISSING
* _plugin_: puntatore alla struttura del plugin di WeeChat, used to initialize
the convenience global pointer `weechat_plugin`
* _argc_: numero di argomenti per il plugin (fornito dalla riga di comando
dall'utente)
* _argv_: argomenti per il plugin
* _argc_: numero di argomenti per il plugin
// TRANSLATION MISSING
* _argv_: argomenti per il plugin (see below)
Valori restituiti:
@ -117,6 +117,32 @@ Valori restituiti:
* _WEECHAT_RC_ERROR_ se c'è un errore (il plugin NON
verrà caricato)
// TRANSLATION MISSING
[[plugin_arguments]]
===== Plugin arguments
When the plugin is loaded by WeeChat, it receives the list of arguments
in parameter `argv` and the number of arguments in `argc`.
The arguments can be:
* command line arguments when running the WeeChat binary,
* arguments given to the command `/plugin load xxx`, when the plugin is manually
loaded by the user.
When the arguments come from the command line, only these arguments are sent to
the plugin:
*-a*, *--no-connect*::
Disabilita la connessione automatica ai server all'avvio di WeeChat.
*-s*, *--no-script*::
Disabilita il caricamento automatico dei script.
*plugin:option*::
Option for a plugin: only the plugin-related options are sent, for example
only the options starting with `irc:` are sent to the plugin called "irc".
// TRANSLATION MISSING
[[plugin_priority]]
===== Plugin priority

View File

@ -100,14 +100,41 @@ int weechat_plugin_init (struct t_weechat_plugin *plugin,
* _plugin_: WeeChat プラグイン構造体へのポインタ。これはグローバルポインタ
`weechat_plugin` を初期化する際に使われます
* _argc_: プラグインに対する引数の数 (ユーザがコマンドラインで指定)
* _argv_: プラグインに対する引数
* _argc_: プラグインに対する引数の数
// TRANSLATION MISSING
* _argv_: プラグインに対する引数 (see below)
戻り値:
* _WEECHAT_RC_OK_ 成功した場合 (プラグインをロードします)
* _WEECHAT_RC_ERROR_ エラーが起きた場合 (プラグインをロードしません)
// TRANSLATION MISSING
[[plugin_arguments]]
===== Plugin arguments
When the plugin is loaded by WeeChat, it receives the list of arguments
in parameter `argv` and the number of arguments in `argc`.
The arguments can be:
* command line arguments when running the WeeChat binary,
* arguments given to the command `/plugin load xxx`, when the plugin is manually
loaded by the user.
When the arguments come from the command line, only these arguments are sent to
the plugin:
*-a*, *--no-connect*::
WeeChat の起動時にサーバへの自動接続を行わない
*-s*, *--no-script*::
スクリプトの自動ロードを止める
*plugin:option*::
Option for a plugin: only the plugin-related options are sent, for example
only the options starting with `irc:` are sent to the plugin called "irc".
[[plugin_priority]]
===== プラグインの優先度