Fix lobby friend and ignores filters in the gamelist

This commit is contained in:
Tomasz Śniatowski 2009-11-17 14:39:40 +01:00
parent 738a47cd16
commit 908f59f738
2 changed files with 7 additions and 0 deletions

View file

@ -104,6 +104,7 @@ user_info::user_info(const config& c)
, registered(utils::string_bool(c["registered"]))
, observing(c["status"] == "observing")
{
update_relation();
}
void user_info::update_state(int selected_game_id, const room_info* current_room /*= NULL*/)
@ -121,6 +122,11 @@ void user_info::update_state(int selected_game_id, const room_info* current_room
state = LOBBY;
}
}
update_relation();
}
void user_info::update_relation()
{
if (name == preferences::login()) {
relation = ME;
} else if (preferences::is_ignored(name)) {

View file

@ -87,6 +87,7 @@ struct user_info
user_info(const config& c);
void update_state(int selected_game_id, const room_info* current_room = NULL);
void update_relation();
enum user_relation { FRIEND, ME, NEUTRAL, IGNORED };
enum user_state { LOBBY, SEL_ROOM, GAME, SEL_GAME };