Handle WeeChat -a/--no-autoconnect flag.
This commit is contained in:
parent
391c5829d8
commit
57dd75afaa
11
src/twc.c
11
src/twc.c
@ -59,7 +59,16 @@ weechat_plugin_init(struct t_weechat_plugin *plugin, int argc, char *argv[])
|
|||||||
twc_config_init();
|
twc_config_init();
|
||||||
twc_config_read();
|
twc_config_read();
|
||||||
|
|
||||||
// TODO: respect weechat flag for no autoconnect
|
bool no_autoconnect = false;
|
||||||
|
for (int i = 0; i < argc; i++)
|
||||||
|
{
|
||||||
|
if (weechat_strcasecmp(argv[i], "-a") == 0
|
||||||
|
|| weechat_strcasecmp(argv[i], "--no-connect") == 0)
|
||||||
|
{
|
||||||
|
no_autoconnect = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!no_autoconnect)
|
||||||
twc_profile_autoload();
|
twc_profile_autoload();
|
||||||
|
|
||||||
return WEECHAT_RC_OK;
|
return WEECHAT_RC_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user