From e4543c81e2d856f5a063d1a70e9be2acb87fabb5 Mon Sep 17 00:00:00 2001 From: Austin Date: Sat, 30 Oct 2021 04:15:19 -0400 Subject: [PATCH] player reports prep --- IsAliveCheck.php | 7 --- html/MCP/index.php | 10 +++++ html/MCP/reports/data/PlayerReport.txt | 55 ++++++++++++++++++++++++ html/MCP/reports/data/index.php | 53 +++++++++++++++++++++++ html/MCP/reports/index.php | 2 + html/MCP/reports/view.php | 46 ++++++++++++++++++++ html_api/moderation/AbuseReport/test.txt | 4 ++ 7 files changed, 170 insertions(+), 7 deletions(-) create mode 100644 html/MCP/reports/data/PlayerReport.txt create mode 100644 html/MCP/reports/data/index.php create mode 100644 html/MCP/reports/index.php create mode 100644 html/MCP/reports/view.php create mode 100644 html_api/moderation/AbuseReport/test.txt diff --git a/IsAliveCheck.php b/IsAliveCheck.php index be0ba51..9a0a81a 100644 --- a/IsAliveCheck.php +++ b/IsAliveCheck.php @@ -2,13 +2,11 @@ /* Alphaland 2021 -This check seems to show Thumbnail or Gameserver offline every 1 in 2000 checks, probably due to curl or some sort of flood check on the arbiter. TODO: look more into that */ //vars $thumbalive = false; $gamealive = false; -// ... //UTIL FUNCTIONS function checkThumb($override) @@ -32,7 +30,6 @@ function checkThumb($override) $set->execute(); } } - // ... } function checkGame($override) @@ -56,21 +53,17 @@ function checkGame($override) $set->execute(); } } - // ... } -// ... //first time running, pass true to force a check without SQL query limit restriction checkGame(true); checkThumb(true); -// ... while (true) //EZ { //we are in the loop now, run without override checkGame(false); checkThumb(false); - // ... usleep(10000); //if both requests timeout after 5 seconds, the max this script will halt is 20 seconds } diff --git a/html/MCP/index.php b/html/MCP/index.php index da7bbf6..7351f7a 100644 --- a/html/MCP/index.php +++ b/html/MCP/index.php @@ -40,6 +40,16 @@ $body = << +
+
+
+
+

+
Reports
+
+
+
+
EOT; pageHandler(); diff --git a/html/MCP/reports/data/PlayerReport.txt b/html/MCP/reports/data/PlayerReport.txt new file mode 100644 index 0000000..28478e6 --- /dev/null +++ b/html/MCP/reports/data/PlayerReport.txt @@ -0,0 +1,55 @@ + + AbuserID:3;Cheating/Exploiting; Short Description (Optional) + + ass + nigger + ass + nigger + ass + ass + niggre + nigger + ass + a + a + a + a + a + a + a + chode + what + ass + ass + ass + nigger + assssss + ass + nigger + a + a + ass + ass + asss + ass + ass + ass + ass + nigger + ngg + ass + a + ass + ass + ass + ass + a + a + chode + what + a + a + ass + ass + + \ No newline at end of file diff --git a/html/MCP/reports/data/index.php b/html/MCP/reports/data/index.php new file mode 100644 index 0000000..5517df8 --- /dev/null +++ b/html/MCP/reports/data/index.php @@ -0,0 +1,53 @@ +attributes()->userID; + $placeid = (int)$ParsedXML->attributes()->placeID; + $jobid = (string)$ParsedXML->attributes()->gameJobID; + + $commentdata = explode(";", $ParsedXML->comment); + + $abuserid = (int)filter_var($commentdata[0], FILTER_SANITIZE_NUMBER_INT); + $reportreason = (string)trim($commentdata[1]); + $reportdescription = (string)trim($commentdata[2]); + + $chats = $ParsedXML->xpath('//message'); + + $jsonData = array( + "ReporterUid" => $reporteruserid, + "PlaceId" => $placeid, + "JobId" => $jobid, + "AbuserId" => $abuserid, + "Reason" => $reportreason, + "Description" => $reportdescription + ); + + //die(json_encode($jsonData)); + + foreach($chats as $chat) { + $userid = (int)$chat['userID']; + $userchat = (string)$chat; + + $chatData = array( + "userid" => $userid, + "chat" => $userchat + ); + + array_push($jsonData, $chatData); + } + + die(json_encode($jsonData)); +} \ No newline at end of file diff --git a/html/MCP/reports/index.php b/html/MCP/reports/index.php new file mode 100644 index 0000000..a4abe2d --- /dev/null +++ b/html/MCP/reports/index.php @@ -0,0 +1,2 @@ +Report Data +
+
+
+
+
+
+
Reporter ID:
+
Place ID:
+
Job ID: ""
+
+
Abuser ID:
+
Report Reason: ""
+
Description: ""
+
+
Chat Log:
+
+ +
+
+
+ +
+
+
+
+
+
+
+ + +EOT; + +pageHandler(); +$ph->pageTitle("Chat Logs"); +$ph->body = $body; +$ph->output(); \ No newline at end of file diff --git a/html_api/moderation/AbuseReport/test.txt b/html_api/moderation/AbuseReport/test.txt new file mode 100644 index 0000000..4435211 --- /dev/null +++ b/html_api/moderation/AbuseReport/test.txt @@ -0,0 +1,4 @@ + + AbuserID:0;Bad Model or Script;test + + \ No newline at end of file