diff options
Diffstat (limited to 'src/plugins/relay/relay.c')
-rw-r--r-- | src/plugins/relay/relay.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/relay/relay.c b/src/plugins/relay/relay.c index 062866588..387a88170 100644 --- a/src/plugins/relay/relay.c +++ b/src/plugins/relay/relay.c @@ -136,6 +136,8 @@ relay_debug_dump_cb (void *data, const char *signal, const char *type_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; @@ -158,6 +160,19 @@ 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) + relay_upgrade_load (); + return WEECHAT_RC_OK; } |