From 09bd0164ebc020a54b944b7326dcba496fb5d82c Mon Sep 17 00:00:00 2001 From: Minteck Date: Fri, 26 Aug 2022 22:29:23 +0200 Subject: idk when was the last commit so I'm making a new one - Violet Dawn --- includes/short.php | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 includes/short.php (limited to 'includes/short.php') diff --git a/includes/short.php b/includes/short.php new file mode 100644 index 0000000..dec0e09 --- /dev/null +++ b/includes/short.php @@ -0,0 +1,47 @@ + "/raindrops", + "cb" => "/cloudburst", + "minty" => "/cloudy" +]; + +foreach ($members as $member) { + for ($i = 1; $i < strlen($member["name"]); $i++) { + $part = substr($member["name"], 0, $i); + + if (in_array($part, array_keys($list))) { + $list[$part] = false; + } else { + $list[$part] = "/" . $member["name"]; + } + } + + foreach ($member["proxy_tags"] as $proxy) { + $system = $member["_system"] === "gdapd" ? "rd" : "cb"; + $list[$system . preg_replace("/[^a-z]/m", "", $proxy["prefix"])] = "/" . $member["name"]; + } + + $list[$member["id"]] = "/" . $member["name"]; + $list[$member["uuid"]] = "/" . $member["name"]; +} + +$list["minty"] = "/cloudy"; + +if (in_array($toplevel, array_keys($list)) && $list[$toplevel]) { + if ($toplevel !== "unknown") { + header("Location: " . $list[$toplevel]); + } else { + header("Location: /?error=Page not found: " . strip_tags($toplevel)) and die(); + } +} else { + header("Location: /?error=Page not found: " . strip_tags($toplevel)) and die(); +} \ No newline at end of file -- cgit