mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 21:06:38 +02:00
core: send all command line parameters not beginning with a dash to all plugins, add info "auto_load_scripts"
This fixes an issue with IRC URL given on command line when it starts with `ircs://` or `irc6://`: the server is not created at all (only `irc://` works fine).
This commit is contained in:
@@ -448,6 +448,27 @@ plugin_api_info_auto_connect_cb (const void *pointer, void *data,
|
||||
return strdup (value);
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns WeeChat info "auto_load_scripts".
|
||||
*/
|
||||
|
||||
char *
|
||||
plugin_api_info_auto_load_scripts_cb (const void *pointer, void *data,
|
||||
const char *info_name,
|
||||
const char *arguments)
|
||||
{
|
||||
char value[32];
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
(void) data;
|
||||
(void) info_name;
|
||||
(void) arguments;
|
||||
|
||||
snprintf (value, sizeof (value), "%d", weechat_auto_load_scripts);
|
||||
return strdup (value);
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns WeeChat info "charset_terminal".
|
||||
*/
|
||||
@@ -1964,9 +1985,14 @@ plugin_api_info_init ()
|
||||
NULL, &plugin_api_info_weechat_daemon_cb, NULL, NULL);
|
||||
hook_info (NULL, "auto_connect",
|
||||
N_("1 if automatic connection to servers is enabled, "
|
||||
"0 if it has been disabled by the user (option \"-a\" or "
|
||||
"\"--no-connect\")"),
|
||||
"0 if it has been disabled by the user "
|
||||
"(option \"-a\" or \"--no-connect\")"),
|
||||
NULL, &plugin_api_info_auto_connect_cb, NULL, NULL);
|
||||
hook_info (NULL, "auto_load_scripts",
|
||||
N_("1 if scripts are automatically loaded, "
|
||||
"0 if the auto-load has been disabled by the user "
|
||||
"(option \"-s\" or \"--no-script\")"),
|
||||
NULL, &plugin_api_info_auto_load_scripts_cb, NULL, NULL);
|
||||
hook_info (NULL, "charset_terminal",
|
||||
N_("terminal charset"),
|
||||
NULL, &plugin_api_info_charset_terminal_cb, NULL, NULL);
|
||||
|
||||
Reference in New Issue
Block a user