Allow nick change in chat room

This commit is contained in:
James Booth
2012-11-18 18:36:17 +00:00
parent a847ad5603
commit e9d6ba2117
7 changed files with 76 additions and 0 deletions

View File

@@ -56,6 +56,17 @@ room_join(const char * const room, const char * const nick)
g_hash_table_insert(rooms, strdup(room), new_room);
}
void
room_change_nick(const char * const room, const char * const nick)
{
muc_room *chat_room = g_hash_table_lookup(rooms, room);
if (chat_room != NULL) {
free(chat_room->nick);
chat_room->nick = strdup(nick);
}
}
void
room_leave(const char * const room)
{