if( get_user_flags(id) & (ADMIN_MAP | ADMIN_SLAY) == (ADMIN_MAP | ADMIN_SLAY) ) { // Has only flags "e" and "f". }