Added basic /rooms command to get chat room list

This commit is contained in:
James Booth
2013-03-13 23:38:26 +00:00
parent ed2212a0ca
commit b960b76034
7 changed files with 126 additions and 0 deletions

View File

@@ -401,6 +401,20 @@ prof_handle_version_result(const char * const jid, const char * const presence,
win_current_page_off();
}
void
prof_handle_room_list(GSList *rooms, const char *conference_node)
{
if ((rooms != NULL) && (g_slist_length(rooms) > 0)) {
cons_show("Chat rooms at %s:", conference_node);
while (rooms != NULL) {
cons_show(" %s", rooms->data);
rooms = g_slist_next(rooms);
}
} else {
cons_show("No chat rooms at %s", conference_node);
}
}
/*
* Take a line of input and process it, return TRUE if profanity is to
* continue, FALSE otherwise