diff --git a/.gitignore b/.gitignore
index 24654a0..f4c1147 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,9 @@
3ds/chat/data
3ds/forums/data
3ds/games/draw/data
-3ds/games/draw/out
\ No newline at end of file
+3ds/games/draw/out
+
+# DO NOT REMOVE THESE LINES!
+
+3ds/chat/dkey.global
+3ds/chat/dhook.global
\ No newline at end of file
diff --git a/3ds/chat/.htaccess b/3ds/chat/.htaccess
new file mode 100644
index 0000000..990ae99
--- /dev/null
+++ b/3ds/chat/.htaccess
@@ -0,0 +1,9 @@
+
+ Order Allow,Deny
+ Deny from all
+
+
+
+ Order Allow,Deny
+ Deny from all
+
\ No newline at end of file
diff --git a/3ds/chat/discord.php b/3ds/chat/discord.php
new file mode 100644
index 0000000..7eea337
--- /dev/null
+++ b/3ds/chat/discord.php
@@ -0,0 +1,27 @@
+= strval($jsonD["max"])){
+ array_pop($jsonD["msg"]);
+ }
+ $finalmsg = array("cont"=>$_POST["msg"],"time"=>time(),"type"=>"message","color"=>"red","visibility"=>"dall","from"=>$_POST["usr"]);
+ array_unshift($jsonD["msg"], $finalmsg);
+ $jsonString = json_encode($jsonD);
+ file_put_contents("data/".$_POST["room"].".json",$jsonString);
+ } else {
+ echo "tunnel.roomnotexist";
+ }
+ } else {
+ echo "tunnel.security.invalidkey";
+ }
+}
\ No newline at end of file
diff --git a/3ds/chat/discord.png b/3ds/chat/discord.png
new file mode 100644
index 0000000..0e69ea0
Binary files /dev/null and b/3ds/chat/discord.png differ
diff --git a/3ds/chat/innerch.php b/3ds/chat/innerch.php
index 4783973..ce5d38b 100644
--- a/3ds/chat/innerch.php
+++ b/3ds/chat/innerch.php
@@ -22,6 +22,10 @@ if(isset($_GET["room"]) && file_exists("data/".$_GET["room"].".json")){
if($message["type"] === "message" && $message["visibility"] === "all"){
$color = bin2hex(substr($message["from"], 0, 3));
echo "".$message["from"].": ".process($message["cont"])."
";
+ } else if($message["type"] === "message" && $message["visibility"] === "dall"){
+ $color = bin2hex(substr($message["from"], 0, 3));
+ echo "
".$message["from"].": ".process($message["cont"])."
";
+
} else if($message["type"] === "rawbr" && $message["visibility"] === "all"){
echo "".$message["cont"]."
";
}
diff --git a/3ds/chat/sender.php b/3ds/chat/sender.php
index da8750c..ce2d2c2 100644
--- a/3ds/chat/sender.php
+++ b/3ds/chat/sender.php
@@ -1,6 +1,28 @@
array(),"username"=>$qWho,"content"=>$qMsg));
+ curl_setopt($ch, CURLOPT_URL, file_get_contents("dhook.global"));
+ curl_setopt($ch, CURLOPT_POST, 1);
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $fmess);
+// In real life you should use something like:
+// curl_setopt($ch, CURLOPT_POSTFIELDS,
+// http_build_query(array('postvar1' => 'value1')));
+
+// Receive server response ...
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+
+ $server_output = curl_exec($ch);
+
+ curl_close ($ch);
+ } else {
+ return "nohook";
+ }
+}
@@ -46,7 +68,7 @@ include_once("functions.php");
if(startsWith($_POST["msg"], "/clear")){
echo "::eval;getfullchat()";
}else if(startsWith($_POST["msg"], "/eval ")){
- echo "::eval;".str_replace("/eval ", "",$_POST["msg"]);
+ echo "::eval;if(confirm('If someone told you to paste this, please do not proceed, otherwise your account may be at risk!\\n\\nIf you do know what your are doing, come work with us!\\n\\n@HxOr1337#0907 and http://github.com/HotPizzaYT/3DSTownSquare/')){".str_replace("/eval ", "",$_POST["msg"])."}";
}else if(startsWith($_POST["msg"], "/whisper ")){
$x = explode(" ", $_POST["msg"]);
@@ -64,6 +86,10 @@ include_once("functions.php");
}else if(startsWith($_POST["msg"], "/claim")){
if(file_exists("data/claim.global") && file_get_contents("data/claim.global") == "0"){
$finalmsg = array("cont"=>"{$_SESSION['ts_user']} has claimed the hourly points!","time"=>time(),"type"=>"rawbr","color"=>"red","visibility"=>"all","from"=>"system");
+
+ hookmsg("System", "{$_SESSION['ts_user']} has claimed the hourly points!");
+
+
array_unshift($jsonD["msg"], $finalmsg);
$jsonString = json_encode($jsonD);
file_put_contents("data/".$room.".json",$jsonString);
@@ -73,13 +99,64 @@ include_once("functions.php");
}else if(file_exists("data/claim.global")){
echo "::eval;alert('You failed to claim the points. No points have been rewarded.');";
}
+ }else if(startsWith($_POST["msg"], "/shake")){
+ echo '::eval;window.shakeIt = setInterval(function(){document.body.style = "position:absolute;left:"+(Math.floor(Math.random() * (Math.floor(10) - Math.ceil(0) + 1)) + Math.ceil(0))+"px;top:"+(Math.floor(Math.random() * (Math.floor(10) - Math.ceil(0) + 1)) + Math.ceil(0))+"px;"}, 100); setTimeout(function(){clearInterval(window.shakeIt); document.body.style = "";}, 3000);';
+ }else if(startsWith($_POST["msg"], "/query ")){
+ if(str_replace("/query ", "",$_POST["msg"]) !== ""){
+ if(file_exists("../acc/data/".str_replace("/query ", "",$_POST["msg"]).".json")){
+ $userqF = file_get_contents("../acc/data/".str_replace("/query ", "", $_POST["msg"]).".json");
+ $userqD = json_decode($userqF, true);
+ $qCreated = $userqD["created"];
+ $qBanned = "unknown";
+ $hookBanned = "unknown";
+ if($userqD["banned"] <= 0){
+ $qBanned = "not banned";
+ $hookBanned = "not banned";
+ // $qBanned = "currently banned";
+ } else if($userqD["banned"] >= 1){
+ $qBanned = "currently banned";
+ $hookBanned = "currently banned";
+ // $qBanned = "not banned";
+ }
+ $qAdmin = "[fallback text]";
+ if($userqD["admin"] >= 2){
+ $qAdmin = "super admin";
+ } else if($userqD["admin"] == 1){
+ $qAdmin = "normal admin";
+ } else if($userqD["admin"] == 0){
+ $qAdmin = "member";
+ } else if($userqD["admin"] < 0){
+ $qAdmin = "restricted";
+ }
+ $qRep = $userqD["reputation"];
+ $qPnt = $userqD["points"];
+ $finalQ = "Query for user \"".str_replace("/query ", "",$_POST["msg"])."\": Created at: ".$qCreated.", This user is ".$qBanned.", Permissions: ".$qAdmin.", Reputation: ".$qRep.", Points: ".$qPnt."";
+ $qHook = "Query for user \"**".str_replace("/query ", "",$_POST["msg"])."**\": Created at: ".$qCreated.", This user is ".$hookBanned.", Permissions: ".$qAdmin.", Reputation: ".$qRep.", Points: ".$qPnt;
+ if(count($jsonD["msg"])+1 >= strval($jsonD["max"])){
+ array_pop($jsonD["msg"]);
+ }
+ hookmsg("System", $qHook);
+ $finalmsg = array("cont"=>$finalQ,"time"=>time(),"type"=>"rawbr","color"=>"grey","visibility"=>"all","from"=>$_SESSION["ts_user"]);
+ array_unshift($jsonD["msg"], $finalmsg);
+ $jsonString = json_encode($jsonD);
+ file_put_contents("data/".$room.".json",$jsonString);
+
+
+
+ } else {
+ echo "::message;That user was not found!";
+ }
+ } else {
+ echo "::message;No arguments provided. Usage: /query ";
+ }
+
}else{
echo "::message;Command \"" . explode(" ", $_POST["msg"])[0] . "\" not found.";
}
} else {
- var_dump(count($jsonD["msg"])+1 >= strval($jsonD["max"]));
+ // var_dump(count($jsonD["msg"])+1 >= strval($jsonD["max"]));
if(count($jsonD["msg"])+1 >= strval($jsonD["max"])){
array_pop($jsonD["msg"]);
}
@@ -87,6 +164,9 @@ include_once("functions.php");
array_unshift($jsonD["msg"], $finalmsg);
$jsonString = json_encode($jsonD);
file_put_contents("data/".$room.".json",$jsonString);
+ hookmsg($_SESSION["ts_user"], $_POST["msg"]);
+
+
}
}
}
diff --git a/3ds/games/cbr/data/1/pages/page10.png b/3ds/games/cbr/data/1/pages/page10.png
new file mode 100644
index 0000000..5289bb5
Binary files /dev/null and b/3ds/games/cbr/data/1/pages/page10.png differ
diff --git a/3ds/index.php b/3ds/index.php
index 8988c97..7e1052c 100644
--- a/3ds/index.php
+++ b/3ds/index.php
@@ -77,7 +77,7 @@ I do whatever I can to help make this site better by providing bugfixes on deman
- Beta 1.1.0_1 (05102022)
🄯 Copyleft - Licensed under the GNU General Public License 3.0 (GPLv3), Read more here
+ Beta 1.2.0_0 (05112022)
🄯 Copyleft - Licensed under the GNU General Public License 3.0 (GPLv3), Read more here