Added /time off

This commit is contained in:
James Booth
2014-11-16 01:28:41 +00:00
parent 8c027a56f9
commit cd855d3740
4 changed files with 19 additions and 9 deletions

View File

@@ -1409,6 +1409,7 @@ cmd_init(void)
time_ac = autocomplete_new();
autocomplete_add(time_ac, "minutes");
autocomplete_add(time_ac, "seconds");
autocomplete_add(time_ac, "off");
cmd_history_init();
}

View File

@@ -3043,6 +3043,11 @@ cmd_time(gchar **args, struct cmd_help_t help)
cons_show("Time precision set to seconds.");
wins_resize_all();
return TRUE;
} else if (g_strcmp0(args[0], "off") == 0) {
prefs_set_string(PREF_TIME, "off");
cons_show("Time display disabled.");
wins_resize_all();
return TRUE;
} else {
cons_show("Usage: %s", help.usage);
return TRUE;