summaryrefslogtreecommitdiff
path: root/src/command.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2003-09-30 22:04:10 +0000
committerSebastien Helleu <flashcode@flashtux.org>2003-09-30 22:04:10 +0000
commit77e0d01d7a1d57b612a637b1fc8046a3c0537538 (patch)
treee2241515f62f7e65425e1f81b40f9b08cc09acd4 /src/command.c
parentb4ff775f03e365f1c5486a1daf1d313e8f955aa7 (diff)
downloadweechat-77e0d01d7a1d57b612a637b1fc8046a3c0537538.zip
Config is now saved and added /save command
Diffstat (limited to 'src/command.c')
-rw-r--r--src/command.c13
1 files changed, 13 insertions, 0 deletions
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 },
@@ -943,6 +946,16 @@ weechat_cmd_server (int argc, char **argv)
}
/*
+ * 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
*/