From 77e0d01d7a1d57b612a637b1fc8046a3c0537538 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Tue, 30 Sep 2003 22:04:10 +0000 Subject: Config is now saved and added /save command --- src/command.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/command.c') diff --git a/src/command.c b/src/command.c index e599defbd..46f9568cc 100644 --- a/src/command.c +++ b/src/command.c @@ -71,6 +71,9 @@ t_weechat_command weechat_commands[] = "username: user name\n" "realname: real name of user\n"), 0, MAX_ARGS, weechat_cmd_server, NULL }, + { "save", N_("save config to disk"), + N_("[file]"), N_("file: filename for writing config"), + 0, 1, weechat_cmd_save, NULL }, { "set", N_("set config parameters"), N_("[option [value]]"), N_("option: name of an option\nvalue: value for option"), 0, 2, weechat_cmd_set, NULL }, @@ -942,6 +945,16 @@ weechat_cmd_server (int argc, char **argv) return 0; } +/* + * weechat_cmd_save: set options + */ + +int +weechat_cmd_save (int argc, char **argv) +{ + return (config_write ((argc == 1) ? argv[0] : NULL)); +} + /* * weechat_cmd_set: set options */ -- cgit v1.2.3