about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-11-16 01:28:41 +0000
committerJames Booth <boothj5@gmail.com>2014-11-16 01:28:41 +0000
commitcd855d3740c9fa0574bf15616754b359e4c9e1b1 (patch)
tree64c00ffd1cee1c4f589d493fc33de59317e7fef8 /src/command
parent8c027a56f94f019ff787d85899f35bce7180cb05 (diff)
downloadprofani-tty-cd855d3740c9fa0574bf15616754b359e4c9e1b1.tar.gz
Added /time off
Diffstat (limited to 'src/command')
-rw-r--r--src/command/command.c1
-rw-r--r--src/command/commands.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 76f8d5e0..3dcca100 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -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();
 }
diff --git a/src/command/commands.c b/src/command/commands.c
index 2393a72c..3e3f7b0c 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -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;