Skip to content

Commit

Permalink
New cheat
Browse files Browse the repository at this point in the history
  • Loading branch information
codergautam committed Dec 30, 2024
1 parent 2d4db55 commit aa2ec84
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
6 changes: 2 additions & 4 deletions components/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -1862,6 +1862,7 @@ setShowCountryButtons(false)
useEffect(() => {
function checkForCheats() {
if(document.getElementById("coo1rdinates")) return true;
if(document.getElementById("map-canvas")) return true;
// try {
// if(window.localStorage.getItem("banned")) return true;
// } catch(e) {
Expand All @@ -1872,10 +1873,7 @@ setShowCountryButtons(false)
if(window.banned) return;
sendEvent("cheat_detected")
// redirect to banned page
alert("imagine cheating on a free geography game. L")
window.location.href = "https://www.youtube.com/watch?v=dQw4w9WgXcQ";
window.banned = true;
document.write("<h1>You have been banned from playing this game.</h1> If you believe this is a mistake, please contact us at [email protected]")
window.location.href = "/banned";
window.localStorage.setItem("banned", "true")
}
if(checkForCheats()) {
Expand Down
18 changes: 18 additions & 0 deletions pages/banned.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

export default function Cheats() {
return (
<div>
<h1
style={{
color: "red",
}}

>Cheats detected!</h1>
<p>You are permanantly banned.</p>
<p>
If you believe this is an error, please contact us at <a href="mailto:[email protected] ">
[email protected] </a>
</p>
</div>
)
}

0 comments on commit aa2ec84

Please sign in to comment.