simplyfy conditional structure

This commit is contained in:
gfgtdf 2014-11-03 01:17:05 +01:00
parent 54e27d2d3f
commit ea2386a8a7

View File

@ -251,10 +251,9 @@ void connect_engine::import_user(const config& data, const bool observer,
}
}
if (side_taken < 0) {
// If no sides were assigned for a user,
// take a first available side.
if (!side_assigned) {
if (side_taken < 0 && !side_assigned) {
BOOST_FOREACH(side_engine_ptr side, side_engines_) {
if (side->available_for_user(username) ||
side->controller() == CNTR_LOCAL) {
@ -265,7 +264,6 @@ void connect_engine::import_user(const config& data, const bool observer,
}
}
}
}
// Check if user has taken any sides, which should get control
// over any other sides.