Added check members only room to send mediated invites
This commit is contained in:
14
src/muc.c
14
src/muc.c
@@ -62,6 +62,7 @@ typedef struct _muc_room_t {
|
||||
Autocomplete jid_ac;
|
||||
GHashTable *nick_changes;
|
||||
gboolean roster_received;
|
||||
muc_member_type_t member_type;
|
||||
} ChatRoom;
|
||||
|
||||
GHashTable *rooms = NULL;
|
||||
@@ -177,6 +178,7 @@ muc_join(const char * const room, const char * const nick,
|
||||
new_room->roster_received = FALSE;
|
||||
new_room->pending_nick_change = FALSE;
|
||||
new_room->autojoin = autojoin;
|
||||
new_room->member_type = MUC_MEMBER_TYPE_UNKNOWN;
|
||||
|
||||
g_hash_table_insert(rooms, strdup(room), new_room);
|
||||
}
|
||||
@@ -763,6 +765,18 @@ muc_set_affiliation(const char * const room, const char * const affiliation)
|
||||
}
|
||||
}
|
||||
|
||||
muc_member_type_t
|
||||
muc_member_type(const char * const room)
|
||||
{
|
||||
ChatRoom *chat_room = g_hash_table_lookup(rooms, room);
|
||||
if (chat_room) {
|
||||
return chat_room->member_type;
|
||||
} else {
|
||||
return MUC_MEMBER_TYPE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_free_room(ChatRoom *room)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user