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/relay | |
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/relay')
-rw-r--r-- | src/plugins/relay/relay.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/plugins/relay/relay.c b/src/plugins/relay/relay.c index 0ee62a154..f09540918 100644 --- a/src/plugins/relay/relay.c +++ b/src/plugins/relay/relay.c @@ -187,8 +187,6 @@ relay_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; @@ -212,17 +210,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) relay_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_relay_plugin->upgrading) relay_upgrade_load (); relay_hook_timer = weechat_hook_timer (1 * 1000, 0, 0, |