Added output for /disco items
This commit is contained in:
@@ -174,6 +174,7 @@ void cons_show_software_version(const char * const jid,
|
||||
const char * const version, const char * const os);
|
||||
void cons_show_account_list(gchar **accounts);
|
||||
void cons_show_room_list(GSList *room, const char * const conference_node);
|
||||
void cons_show_disco_items(GSList *items, const char * const jid);
|
||||
|
||||
// status bar actions
|
||||
void status_bar_refresh(void);
|
||||
|
||||
@@ -1323,6 +1323,26 @@ cons_show_room_list(GSList *rooms, const char * const conference_node)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
cons_show_disco_items(GSList *items, const char * const jid)
|
||||
{
|
||||
if ((items != NULL) && (g_slist_length(items) > 0)) {
|
||||
cons_show("Service discovery items for %s:", jid);
|
||||
while (items != NULL) {
|
||||
DiscoItem *item = items->data;
|
||||
_win_show_time(console->win, '-');
|
||||
wprintw(console->win, " %s", item->jid);
|
||||
if (item->name != NULL) {
|
||||
wprintw(console->win, ", (%s)", item->name);
|
||||
}
|
||||
wprintw(console->win, "\n");
|
||||
items = g_slist_next(items);
|
||||
}
|
||||
} else {
|
||||
cons_show("No service discovery items for %s", jid);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
cons_show_status(const char * const contact)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user