function create_opensim_presence_full($server_uri, $scene_name, $scene_uuid, $scene_x, $scene_y, $userID, $circuitCode, $fullName, $wearables, $attachments, $sessionID, $secureSessionID, $startPosition, $capsPath, $client_ip, $service_urls, $tp_flags, $service_session_id) { if (!ends_with($server_uri, '/')) { $server_uri .= '/'; } $regionUrl = $server_uri . 'agent/' . $userID . '/'; list($firstName, $lastName) = explode(' ', $fullName); $request = array('agent_id' => $userID, 'caps_path' => $capsPath, 'child' => false, 'circuit_code' => $circuitCode, 'first_name' => $firstName, 'last_name' => $lastName, 'session_id' => $sessionID, 'secure_session_id' => $secureSessionID, 'start_pos' => (string) $startPosition, 'appearance_serial' => 1, 'destination_x' => $scene_x, 'destination_y' => $scene_y, 'destination_name' => $scene_name, 'destination_uuid' => $scene_uuid, 'wearables' => $wearables, 'attachments' => $attachments, 'child' => true); if ($client_ip != null) { $request['client_ip'] = $client_ip; } if ($service_urls != null) { $request['service_urls'] = $service_urls; } if ($service_session_id != null) { $request['service_session_id'] = $service_session_id; } if ($tp_flags != null) { $request['teleport_flags'] = $tp_flags; } $response = webservice_post($regionUrl, $request, true); log_dump("webservice post response", $response); if (!empty($response['success'])) { return true; } $seedCapability = null; return false; }
} } $content[] = $notice_link; if (!$thumbnail_exists && !string_to_file(serialize($content), $asset->data_path . '/.sq_system/.sq_notice_links')) { print_r('Still writing :('); $count++; $bad_assetids[] = $assetid; } } else { $content[] = $notice_link; if (!string_to_file(serialize($content), $asset->data_path . '/.sq_system/.sq_notice_links')) { $count++; $bad_assetids[] = $assetid; } } $done_asset++; unset($assetid); } // Warn the user if an error happened if (!empty($count)) { echo "There were {$count} errors in creating .sq_notice_links files.\nThese assets may need to be reviewed manually.\n"; echo "Assetids that need to be looked into (These are in error.log too):\n"; print_r($bad_assetids); // put them in error.log too log_dump("There were " . $count . " errors in creating .sq_notice_links files.\nThese assets may need to be reviewed manually."); log_dump("Assetids that need to be looked into :"); log_dump($bad_assetids); } else { echo "Successfully upgraded " . count($results) . " assets.\n"; } $GLOBALS['SQ_SYSTEM']->restoreRunLevel();