diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-05-29 23:03:53 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-05-29 23:03:53 +0000 |
commit | ad624059ad6c9dc3a7e686a274ed2e52b0cfd576 (patch) | |
tree | 893449d0826060ab95b74dc3bdaec9d7962f25d3 /src/common | |
parent | 6599c523527c4679148acf62635f9846e133a898 (diff) | |
download | weechat-ad624059ad6c9dc3a7e686a274ed2e52b0cfd576.zip |
Command /save now writes plugins options (~/.weechat/plugins.rc)
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/command.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/common/command.c b/src/common/command.c index 1b7a849ca..55a41621a 100644 --- a/src/common/command.c +++ b/src/common/command.c @@ -2814,21 +2814,18 @@ weechat_cmd_plugin (t_irc_server *server, t_irc_channel *channel, } /* - * weechat_cmd_save: save options to disk + * weechat_cmd_save: save WeeChat and plugins options to disk */ int weechat_cmd_save (t_irc_server *server, t_irc_channel *channel, int argc, char **argv) { - int rc; - /* make gcc happy */ (void) server; (void) channel; - rc = config_write ((argc == 1) ? argv[0] : NULL); - if (rc == 0) + if (config_write ((argc == 1) ? argv[0] : NULL) == 0) { irc_display_prefix (NULL, NULL, PREFIX_INFO); gui_printf_nolog (NULL, _("Configuration file saved\n")); @@ -2839,7 +2836,22 @@ weechat_cmd_save (t_irc_server *server, t_irc_channel *channel, gui_printf_nolog (NULL, _("%s failed to save configuration file\n"), WEECHAT_ERROR); } - return rc; + +#ifdef PLUGINS + if (plugin_config_write () == 0) + { + irc_display_prefix (NULL, NULL, PREFIX_INFO); + gui_printf_nolog (NULL, _("Plugins options saved\n")); + } + else + { + irc_display_prefix (NULL, NULL, PREFIX_ERROR); + gui_printf_nolog (NULL, _("%s failed to save plugins options\n"), + WEECHAT_ERROR); + } +#endif + + return 0; } /* |