📦
Community Guide
  • README
  • ❔Faq
    • Accessing Pma
    • Level Reupload 1005 Error
    • Missing Dlls Fix
    • Package Parsing Error Android
    • Phpmyadmin And Ftp
  • 🛠️In Game Help
    • Add Mod Menu
    • Level Commands
    • Remove 6 Digit Song Limit Android
    • Remove Android Anticheat
    • Texture Pack
  • 🔐Phpmyadmin
    • Actions Explain
    • Banning
    • Basic Explanation Of The Php My Admin Tables
    • Change Default Downloads Likes
    • Create Gauntlets
    • Create Mappacks
    • Create Modip
    • Create Quests
    • Create Roles
    • Detailed Explanation Of Phpmyadmin Tables And Columns
    • Elegant Sql Fixes
    • Give Permissions
    • Placing Roles
    • Site Structure
    • PhpMyAdmin FAQ
  • Misc
    • How To Use Tools
    • Making An Old GDPS Version
  • Backend
    • How Autoban Php Works
    • How Cron Works
Powered by GitBook
On this page
  • Connecting to the server
  • Calculating the stars
  • Comparing users with calculated stars
  • IP banning.
  • Guide end

Was this helpful?

Edit on GitHub
  1. Backend

How Autoban Php Works

Last updated 1 year ago

Was this helpful?

I have decided to make a guide on the autoban.php file which is included with Cron, since the code of it could be very complex for non-programmers

Lets look at the first bit of code:

Connecting to the server

include(../../incl/lib/connection.php)

At First, the code includes Connection.php which includes the server login information. this is a crucial part of the code since it cannot ban hackers/innocent players without being able to log in to the db.

Calculating the stars

$query = $db->prepare("too much code")

This is the most complex part of the code (and probably most unoptimized) but all it really does is calculate all the stars in the gdps, all the user coins and all of the demons. It also calculates the gauntlets and map pack stars.

Comparing users with calculated stars

$query->execute();

Now, autoban.php is executing and making some variables for all the coins, stars and demons which are all part of the $levelstuff next, the code is going to check if a user is banned and if they are going over the amount of stars calculated in the whole gdps (including map pack stars) this is done for every user including moderators. it next fetches all the results and compares them to the max stars, coins and demons.

IP banning.

Now its gonna check if the user was already banned, if not they will set the user 'isBanned' state to 1 and ban their IP address (although doing that will do almost nothing unless they are using a static IP adderss). and lastly, it echo's "Autoban Finished"

Guide end

i hope this will help you understand how cron and autoban.php bans users. goodbye until i figure out anything else most likely related with cron.php.

Full Code
Full Code