about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-11-13 22:24:37 +0000
committerJames Booth <boothj5@gmail.com>2012-11-13 22:24:37 +0000
commit8ecbe0c590832200134e54fe55da872917278f64 (patch)
tree397f93d0ee58256578a27d0db86ec1157b339f55 /src
parentfd4d00cdd24ec08bb51d40a01f5f32bf69633925 (diff)
downloadprofani-tty-8ecbe0c590832200134e54fe55da872917278f64.tar.gz
Fixed help command name clash on status
Diffstat (limited to 'src')
-rw-r--r--src/command.c38
-rw-r--r--src/command.h2
-rw-r--r--src/ui.h2
-rw-r--r--src/windows.c14
4 files changed, 28 insertions, 28 deletions
diff --git a/src/command.c b/src/command.c
index 24637798..c2668bef 100644
--- a/src/command.c
+++ b/src/command.c
@@ -125,7 +125,7 @@ static struct cmd_t main_commands[] =
           "-------------------------",
           "Show help options.",
           "Specify list if you want a list of all commands.",
-          "Specify an area (basic, status, settings, navigation) for more help on that area.",
+          "Specify an area (basic, presence, settings, navigation) for more help on that area.",
           "Specify the command if you want more detailed help on a specific command.",
           "",
           "Example : /help list",
@@ -193,9 +193,9 @@ static struct cmd_t main_commands[] =
 
     { "/status",
         _cmd_status,
-        { "/msg user@host", "Find out a contacts status.",
-        { "/msg user@host",
-          "--------------",
+        { "/status user@host", "Find out a contacts status.",
+        { "/status user@host",
+          "-----------------",
           "Find out someones presence information.",
           "Use tab completion to autocomplete the contact.",
           NULL } } },
@@ -436,7 +436,7 @@ static struct cmd_t setting_commands[] =
           NULL } } }
 };
 
-static struct cmd_t status_commands[] =
+static struct cmd_t presence_commands[] =
 {
     { "/away",
         _cmd_away,
@@ -518,7 +518,7 @@ cmd_init(void)
     help_ac = p_autocomplete_new();
     p_autocomplete_add(help_ac, strdup("list"));
     p_autocomplete_add(help_ac, strdup("basic"));
-    p_autocomplete_add(help_ac, strdup("status"));
+    p_autocomplete_add(help_ac, strdup("presence"));
     p_autocomplete_add(help_ac, strdup("settings"));
     p_autocomplete_add(help_ac, strdup("navigation"));
 
@@ -549,8 +549,8 @@ cmd_init(void)
         p_autocomplete_add(help_ac, (gchar *)strdup(pcmd->cmd+1));
     }
 
-    for (i = 0; i < ARRAY_SIZE(status_commands); i++) {
-        struct cmd_t *pcmd = status_commands+i;
+    for (i = 0; i < ARRAY_SIZE(presence_commands); i++) {
+        struct cmd_t *pcmd = presence_commands+i;
         p_autocomplete_add(commands_ac, (gchar *)strdup(pcmd->cmd));
         p_autocomplete_add(help_ac, (gchar *)strdup(pcmd->cmd+1));
         p_autocomplete_add(who_ac, (gchar *)strdup(pcmd->cmd+1));
@@ -640,13 +640,13 @@ cmd_get_settings_help(void)
 }
 
 GSList *
-cmd_get_status_help(void)
+cmd_get_presence_help(void)
 {
     GSList *result = NULL;
 
     unsigned int i;
-    for (i = 0; i < ARRAY_SIZE(status_commands); i++) {
-        result = g_slist_append(result, &((status_commands+i)->help));
+    for (i = 0; i < ARRAY_SIZE(presence_commands); i++) {
+        result = g_slist_append(result, &((presence_commands+i)->help));
     }
 
     return result;
@@ -951,19 +951,19 @@ _cmd_help(const char * const inp, struct cmd_help_t help)
             }
         }
         cons_show_word("\n");
-        cons_show("Status commands:");
+        cons_show("Presence commands:");
         cons_show_time();
-        for (i = 0; i < ARRAY_SIZE(status_commands); i++) {
-            cons_show_word( (status_commands+i)->cmd );
-            if (i < ARRAY_SIZE(status_commands) - 1) {
+        for (i = 0; i < ARRAY_SIZE(presence_commands); i++) {
+            cons_show_word( (presence_commands+i)->cmd );
+            if (i < ARRAY_SIZE(presence_commands) - 1) {
                 cons_show_word(", ");
             }
         }
         cons_show_word("\n");
     } else if (strcmp(inp, "/help basic") == 0) {
         cons_basic_help();
-    } else if (strcmp(inp, "/help status") == 0) {
-        cons_status_help();
+    } else if (strcmp(inp, "/help presence") == 0) {
+        cons_presence_help();
     } else if (strcmp(inp, "/help settings") == 0) {
         cons_settings_help();
     } else if (strcmp(inp, "/help navigation") == 0) {
@@ -1614,8 +1614,8 @@ _cmd_get_command(const char * const command)
         }
     }
 
-    for (i = 0; i < ARRAY_SIZE(status_commands); i++) {
-        struct cmd_t *pcmd = status_commands+i;
+    for (i = 0; i < ARRAY_SIZE(presence_commands); i++) {
+        struct cmd_t *pcmd = presence_commands+i;
         if (strcmp(pcmd->cmd, command) == 0) {
             return pcmd;
         }
diff --git a/src/command.h b/src/command.h
index e53d1773..654a7a7c 100644
--- a/src/command.h
+++ b/src/command.h
@@ -43,6 +43,6 @@ gboolean cmd_execute_default(const char * const inp);
 
 GSList * cmd_get_basic_help(void);
 GSList * cmd_get_settings_help(void);
-GSList * cmd_get_status_help(void);
+GSList * cmd_get_presence_help(void);
 
 #endif
diff --git a/src/ui.h b/src/ui.h
index 3fd6faf7..0b171ea6 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -134,7 +134,7 @@ void cons_about(void);
 void cons_help(void);
 void cons_basic_help(void);
 void cons_settings_help(void);
-void cons_status_help(void);
+void cons_presence_help(void);
 void cons_navigation_help(void);
 void cons_prefs(void);
 void cons_bad_command(const char * const cmd);
diff --git a/src/windows.c b/src/windows.c
index fc21a622..fe14a358 100644
--- a/src/windows.c
+++ b/src/windows.c
@@ -943,7 +943,7 @@ cons_help(void)
     cons_show("");
     cons_show("/help list       - List all commands.");
     cons_show("/help basic      - Summary of basic usgae commands.");
-    cons_show("/help status     - Summary of online status change commands.");
+    cons_show("/help presence   - Summary of online status change commands.");
     cons_show("/help settings   - Summary of commands for changing Profanity settings.");
     cons_show("/help navigation - How to navigate around Profanity.");
     cons_show("/help [command]  - Detailed help on a specific command.");
@@ -985,17 +985,17 @@ cons_settings_help(void)
 }
 
 void
-cons_status_help(void)
+cons_presence_help(void)
 {
     cons_show("");
-    cons_show("Status changes:");
+    cons_show("Presence changes:");
     cons_show("");
 
-    GSList *status_helpers = cmd_get_status_help();
-    while (status_helpers != NULL) {
-        struct cmd_help_t *help = (struct cmd_help_t *)status_helpers->data;
+    GSList *presence_helpers = cmd_get_presence_help();
+    while (presence_helpers != NULL) {
+        struct cmd_help_t *help = (struct cmd_help_t *)presence_helpers->data;
         cons_show("%-25s: %s", help->usage, help->short_help);
-        status_helpers = g_slist_next(status_helpers);
+        presence_helpers = g_slist_next(presence_helpers);
     }
 
     cons_show("");