diff options
Diffstat (limited to 'src/ui/console.c')
-rw-r--r-- | src/ui/console.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ui/console.c b/src/ui/console.c index ad13f0cc..a99769b1 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -837,6 +837,26 @@ cons_show_disco_items(GSList* items, const char* const jid) cons_alert(NULL); } +static void _cons_print_contact_information_item(gpointer data, gpointer user_data) +{ + cons_show(" %s", (char*)data); +} + +static void _cons_print_contact_information_hashlist_item(gpointer key, gpointer value, gpointer userdata) +{ + cons_show(" %s:", (char*)key); + g_slist_foreach((GSList*)value, _cons_print_contact_information_item, NULL); +} + +void +cons_show_disco_contact_information(GHashTable* addresses) +{ + cons_show(""); + cons_show("Server contact information:"); + + g_hash_table_foreach(addresses, _cons_print_contact_information_hashlist_item, NULL); +} + void cons_show_status(const char* const barejid) { |