Handle room member presence

This commit is contained in:
James Booth
2012-11-19 00:26:31 +00:00
parent 6c52ccae1f
commit 645d1b74d5
7 changed files with 55 additions and 1 deletions

View File

@@ -201,6 +201,23 @@ room_parse_room_jid(const char * const full_room_jid, char **room, char **nick)
}
}
gboolean
room_nick_in_roster(const char * const room, const char * const nick)
{
muc_room *chat_room = g_hash_table_lookup(rooms, room);
if (chat_room != NULL) {
PContact contact = g_hash_table_lookup(chat_room->roster, nick);
if (contact != NULL) {
return TRUE;
} else {
return FALSE;
}
}
return FALSE;
}
gboolean
room_add_to_roster(const char * const room, const char * const nick,
const char * const show, const char * const status)