diff options
author | James Booth <boothj5@gmail.com> | 2014-09-21 23:21:48 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-09-21 23:21:48 +0100 |
commit | 9f7a8cea81256d8815c6a1d56e6adcf29ef846f5 (patch) | |
tree | 8a46e1b662e472f11ae91f63db7385b4c45e672a /src/ui | |
parent | f04ed288863effd1daa33bb70615ff095b1a60f8 (diff) | |
download | profani-tty-9f7a8cea81256d8815c6a1d56e6adcf29ef846f5.tar.gz |
Show message when no capabilities available
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/console.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ui/console.c b/src/ui/console.c index 1bf76aa9..49e51912 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -286,15 +286,15 @@ _cons_show_caps(const char * const fulljid, Resource *resource) { ProfWin *console = wins_get_console(); cons_show(""); - const char *resource_presence = string_from_resource_presence(resource->presence); - - int presence_colour = win_presence_colour(resource_presence); - win_save_vprint(console, '-', NULL, NO_EOL, presence_colour, "", "%s", fulljid); - win_save_print(console, '-', NULL, NO_DATE, 0, "", ":"); Capabilities *caps = caps_lookup(fulljid); - if (caps) { + const char *resource_presence = string_from_resource_presence(resource->presence); + + int presence_colour = win_presence_colour(resource_presence); + win_save_vprint(console, '-', NULL, NO_EOL, presence_colour, "", "%s", fulljid); + win_save_print(console, '-', NULL, NO_DATE, 0, "", ":"); + // show identity if ((caps->category != NULL) || (caps->type != NULL) || (caps->name != NULL)) { win_save_print(console, '-', NULL, NO_EOL, 0, "", "Identity: "); @@ -342,6 +342,9 @@ _cons_show_caps(const char * const fulljid, Resource *resource) feature = g_slist_next(feature); } } + + } else { + cons_show("No capabilities found for %s", fulljid); } cons_alert(); |