From efea83e7cafecd2475064373e766198542aee3a4 Mon Sep 17 00:00:00 2001
From: HotPizzaYT <57576298+HotPizzaYT@users.noreply.github.com>
Date: Mon, 25 Apr 2022 22:05:09 -0500
Subject: [PATCH] Finalized whisper system
---
3ds/chat/index.php | 3 +++
3ds/chat/innerchat.php | 6 +++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/3ds/chat/index.php b/3ds/chat/index.php
index 98c1781..6a3127b 100644
--- a/3ds/chat/index.php
+++ b/3ds/chat/index.php
@@ -39,6 +39,9 @@ if(isset($_GET["room"])){
#msg {
width: 272px;
}
+ .whisper{
+ background-color: #00FFFF;
+ }
diff --git a/3ds/chat/innerchat.php b/3ds/chat/innerchat.php
index 3fb096c..4783973 100644
--- a/3ds/chat/innerchat.php
+++ b/3ds/chat/innerchat.php
@@ -13,10 +13,10 @@ if(isset($_GET["room"]) && file_exists("data/".$_GET["room"].".json")){
if($message["visibility"] !== "all"){
$color = bin2hex(substr($message["from"], 0, 3));
if($toYou){
- echo "".$message["from"].": ".process($message["cont"])." [To you]
";
+ echo "".$message["from"].": ".process($message["cont"])." To you
";
}
- if($message["from"] == $_SESSION["ts_user"] && $message["visibility"] != $_SESSION["ts_user"]){
- echo "".$message["from"].": ".process($message["cont"])." [To ".$message["visibility"]."]
";
+ if(isset($_SESSION["ts_user"]) && $message["from"] == $_SESSION["ts_user"] && $message["visibility"] != $_SESSION["ts_user"]){
+ echo "".$message["from"].": ".process($message["cont"])." To ".$message["visibility"]."
";
}
}
if($message["type"] === "message" && $message["visibility"] === "all"){