diff --git a/3ds/chat/discord.php b/3ds/chat/discord.php index 7eea337..37364b0 100644 --- a/3ds/chat/discord.php +++ b/3ds/chat/discord.php @@ -2,9 +2,9 @@ // If I didn't ignore dkey.global and dhook.global, things would be a disaster. That is why Discord keys and Discord webhooks will not be provided. if(isset($_POST["msg"]) && isset($_POST["usr"]) && isset($_POST["room"])){ - if(file_exists("dkey.global") && file_exists("dhook.global")){ + if(!(file_exists("dkey.global")) && !(file_exists("dhook.global"))){ echo "tunnel.setupfailure"; - } else if($_POST["key"] == file_get_contents("dkey.global")){ + } else if($_POST["key"] == file_get_contents("dkey.global") && file_exists("dhook.global")){ if(file_exists("data/".$_POST["room"].".json")){ // Room exists // Set needed variables @@ -19,7 +19,7 @@ if(isset($_POST["msg"]) && isset($_POST["usr"]) && isset($_POST["room"])){ $jsonString = json_encode($jsonD); file_put_contents("data/".$_POST["room"].".json",$jsonString); } else { - echo "tunnel.roomnotexist"; + echo "tunnel.roomnotexistorhooknotexist"; } } else { echo "tunnel.security.invalidkey";