Handle WeeChat -a/--no-autoconnect flag.
This commit is contained in:
parent
391c5829d8
commit
57dd75afaa
13
src/twc.c
13
src/twc.c
@ -59,8 +59,17 @@ 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;
|
||||||
twc_profile_autoload();
|
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();
|
||||||
|
|
||||||
return WEECHAT_RC_OK;
|
return WEECHAT_RC_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user