From eca73909515a067725092f4464a12ad418e4b69a Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 17 Oct 2015 22:58:45 +0100 Subject: Implemented /script show --- src/ui/console.c | 18 ++++++++++++++++++ src/ui/ui.h | 1 + 2 files changed, 19 insertions(+) (limited to 'src/ui') 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 @@ -1599,6 +1599,24 @@ cons_show_scripts(GSList *scripts) cons_alert(); } +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) { 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, -- cgit 1.4.1-2-gfad0