diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-06-24 21:35:37 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-06-24 21:35:37 +0200 |
commit | 1d6714e42820e837d18e46a7b6d9c25902e0193b (patch) | |
tree | e0ea19e1bbb41e3f98227132c624baab47d7099f /src/plugins/xfer | |
parent | 98b5e9046966ae0fde25409987dc98ec5f0b1af8 (diff) | |
download | weechat-1d6714e42820e837d18e46a7b6d9c25902e0193b.zip |
core: auto disable upgrade process (command line option "--upgrade") if the file weechat.upgrade is not found
Diffstat (limited to 'src/plugins/xfer')
-rw-r--r-- | src/plugins/xfer/xfer.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index c1372f2f3..4936a6d36 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -1805,7 +1805,9 @@ xfer_debug_dump_cb (const void *pointer, void *data, int weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { - int i, upgrading; + /* make C compiler happy */ + (void) argc; + (void) argv; weechat_plugin = plugin; @@ -1835,15 +1837,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) xfer_info_init (); - /* look at arguments */ - upgrading = 0; - for (i = 0; i < argc; i++) - { - if (weechat_strcasecmp (argv[i], "--upgrade") == 0) - upgrading = 1; - } - - if (upgrading) + if (weechat_xfer_plugin->upgrading) xfer_upgrade_load (); return WEECHAT_RC_OK; |