Handle room presence notifications

This commit is contained in:
James Booth
2012-11-05 21:36:32 +00:00
parent 0deba9e13e
commit 2f6361a578
6 changed files with 53 additions and 2 deletions

View File

@@ -58,3 +58,17 @@ room_jid_is_room_chat(const char * const jid)
}
char *
room_get_nick_for_room(const char * const jid)
{
GSList *current = rooms;
while (current != NULL) {
muc_room *room = current->data;
if (strcmp(jid, room->jid) == 0) {
return room->nick;
}
current = g_slist_next(current);
}
return NULL;
}