Added /time setting

This commit is contained in:
James Booth
2014-11-16 00:40:54 +00:00
parent 1479a5e134
commit 40dc8e2c49
7 changed files with 58 additions and 2 deletions

View File

@@ -3030,6 +3030,25 @@ cmd_wrap(gchar **args, struct cmd_help_t help)
return result;
}
gboolean
cmd_time(gchar **args, struct cmd_help_t help)
{
if (g_strcmp0(args[0], "minutes") == 0) {
prefs_set_string(PREF_TIME, "minutes");
cons_show("Time precision set to minutes.");
wins_resize_all();
return TRUE;
} else if (g_strcmp0(args[0], "seconds") == 0) {
prefs_set_string(PREF_TIME, "seconds");
cons_show("Time precision set to seconds.");
wins_resize_all();
return TRUE;
} else {
cons_show("Usage: %s", help.usage);
return TRUE;
}
}
gboolean
cmd_states(gchar **args, struct cmd_help_t help)
{