about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-10-17 22:58:45 +0100
committerJames Booth <boothj5@gmail.com>2015-10-17 22:58:45 +0100
commiteca73909515a067725092f4464a12ad418e4b69a (patch)
tree4734638534541eb268722d794a74b3962b0e474a /src/ui
parenta35cbea73273fb7e61218155ca1c28ebab73bb5b (diff)
downloadprofani-tty-eca73909515a067725092f4464a12ad418e4b69a.tar.gz
Implemented /script show
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/console.c18
-rw-r--r--src/ui/ui.h1
2 files changed, 19 insertions, 0 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index 2388e79b..37316d83 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -1600,6 +1600,24 @@ cons_show_scripts(GSList *scripts)
 }
 
 void
+cons_show_script(const char *const script, GSList *commands)
+{
+    cons_show("");
+
+    if (commands == NULL) {
+        cons_show("Script not found: %s", script);
+    } else {
+        cons_show("%s:", script);
+        while (commands) {
+            cons_show("  %s", commands->data);
+            commands = g_slist_next(commands);
+        }
+    }
+
+    cons_alert();
+}
+
+void
 cons_prefs(void)
 {
     cons_show("");
diff --git a/src/ui/ui.h b/src/ui/ui.h
index 1a534012..b7c7a8ae 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -279,6 +279,7 @@ void cons_show_info(PContact pcontact);
 void cons_show_caps(const char * const fulljid, resource_presence_t presence);
 void cons_show_themes(GSList *themes);
 void cons_show_scripts(GSList *scripts);
+void cons_show_script(const char *const script, GSList *commands);
 void cons_show_aliases(GList *aliases);
 void cons_show_login_success(ProfAccount *account, int secured);
 void cons_show_software_version(const char * const jid,