From 2b192b3840ac344c456b98304ea400f0af90da15 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sat, 13 Jan 2024 16:12:11 +0100 Subject: Updated 46 files and deleted 19 files (automated) --- pages/travelling.inc | 223 --------------------------------------------------- 1 file changed, 223 deletions(-) delete mode 100644 pages/travelling.inc (limited to 'pages/travelling.inc') diff --git a/pages/travelling.inc b/pages/travelling.inc deleted file mode 100644 index c7eaadf..0000000 --- a/pages/travelling.inc +++ /dev/null @@ -1,223 +0,0 @@ - [ - 'method' => "DELETE", - 'header' => "Authorization: " . $app["pluralkit"][$travellingSystem === "gdapd" ? "raindrops" : "cloudburst"] - ] - ]; - - $reqContext = stream_context_create($reqOptions); - - // No actual data is received on DELETE, so we don't even bother trying to collect req response; if it fails it will put a warning in the logs anyway. - //sleep(1); - //file_get_contents("https://api.pluralkit.me/v2/members/$travellingMember", false, $reqContext); - } - } else { - $travelling[$_GET['member']]["travelling"] = true; - $travelling[$_GET['member']]["equestria"] = $equestria; - $travelling[$_GET['member']]["pluralkit"] = null; - $travelling[$_GET['member']]["history"][] = [ - "start" => date("c"), - "end" => null, - "equestria" => $equestria - ]; - - if (!$equestria) { - // Insert code here to run after a travelling member is ADDED. - // $id is the member ID (e.g. rirgf) - // $member is the member - // $system is the system the member comes from - // $metadata is the ponies.equestria.horse metadata - // $travellingMember is unset here - // Store the travelling member ID in $travelling[$id]['pluralkit'] - $reqOptions = [ - 'http' => [ - 'method' => "POST", - 'header' => "Authorization: " . $app["pluralkit"][$travellingSystem === "gdapd" ? "raindrops" : "cloudburst"] . "\r\n" . - "Content-Type: application/json", - 'content' => json_encode([ - 'name' => "$member[name]-travelling", - 'display_name' => $member["display_name"], - 'color' => $member["color"], - 'birthday' => $member["birthday"], - 'created' => $member["created"], - 'pronouns' => $member["pronouns"], - 'avatar_url' => $member["avatar_url"], - 'banner' => $member["banner"], - 'description' => "**This pony is visiting this system from the " . ($system === "gdapd" ? "Raindrops System" : "Cloudburst System") . ". They are not a permanent member of this system**\n\n$member[description]", - 'proxy_tags' => array_map(function ($i) { - $i["prefix"] = "+" . $i['prefix']; - return $i; - }, $member["proxy_tags"]), - 'privacy' => $member["privacy"] - ]) - ] - ]; - - $reqContext = stream_context_create($reqOptions); - - //sleep(1); - //$member = json_decode(file_get_contents("https://api.pluralkit.me/v2/members", false, $reqContext), true); - - // Member exists? - //if (isset($member)) { - //$travelling[$id]['pluralkit'] = $member["id"]; - //} - } - } - } - - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/navigation.json", "{}"); - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/home.json", "{}"); - createJob("RefreshCache", []); - - header("Location: /-/travelling"); - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/travelling/travelling.json", utf8_encode(json_encode($travelling, JSON_PRETTY_PRINT))); - die(); -} - -global $use2023UI; - -require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; -global $travelling; - -?> - - - -
-
-
-

System travelling

- -
- -
- "> - " style="width:24px;">  - - -
-
- Current location:
- - - - Equestria - - Celeste - - - "> System - - - () - -
-
- -
- - - - - -
-
- -
- - -
- - -- cgit