diff --git a/README.md b/README.md
index ada73db5..5b1123d9 100755
--- a/README.md
+++ b/README.md
@@ -56,6 +56,9 @@ Mods / Gamepacks
ChangeLog
----
+2/03/2021 - v1.2
+* Can disable and enable registration tokens for register in config.php
+
2/03/2021 - v1.1b
* CSS clean-up
* Admin configuration of server max slots -> config.php
diff --git a/config.php b/config.php
index a6d06245..742a2953 100755
--- a/config.php
+++ b/config.php
@@ -2,19 +2,20 @@
///////
// MTSM - Minetest Server Manager
// (C) Chris Dorman, CC-BY-SA v3.0 (2021)
-// https://github.com/Pentium44/MTSM
-// Version: 1.0
+// https://notabug.org/Pentium44/MTSM
///////
-$mtsmtitle = "webpanel ~ panel.edgy1.net"; // MTSM Title
-$desc = "Simple, ad-free, and lightweight Minetest hosting solution that's number one for YOU! "
+include_once("version.php");
+
+$mtsmtitle = "free.minetest.host"; // MTSM Title
+$desc = "Simple, ad-free, and lightweight Minetest hosting service, FREE to use and free of charge! "
. $mtsmtitle . " is powered by MTSM."; // Description of the panel.
-$domain = "https://panel.edgy1.net"; // where is MTSM operating?
-$version = "1.1b"; // version of MTSM
-$defaultip = "fi.edgy1.net"; // Default IP for user servers
-$maxservers = "100"; // max server count.
+$domain = "https://free.minetest.host"; // where is MTSM operating?
+$defaultip = "free.minetest.host"; // Default IP for user servers
+$maxservers = "50"; // max server count.
$portrange = "30"; // Enable mods from local repository
";
modsForm();
- echo "Enable user available mods
";
- // In case someone fucks there shit up
- echo "Delete user mods
";
- userModsForm($username);
+ // Disable user uploads of zip files when given to general public.
+ if($reg_token_required == "true") {
- echo "Personal mod upload
";
- modUploadForm();
+ echo "Enable user available mods
";
+ // In case someone fucks there shit up
+ echo "Delete user mods
";
+ userModsForm($username);
+
+ echo "Personal mod upload
";
+ modUploadForm();
+
+ }
}
} else {
echo "ERROR: Server not found!";
@@ -793,6 +798,9 @@ else if(isset($_GET['do']))
{
if(filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
include_once("mtm_db/token.php");
+ // Enable registration tokens via config.php now!
+ if($reg_token_required == "true") {
+
if(stripslashes(htmlentities($_POST['codeword'])) == $reg_token) {
$servercount = $servercount + 1;
if ($servercount < 10) {
@@ -813,6 +821,22 @@ else if(isset($_GET['do']))
{
echo "ERROR: Registration code incorrect, please try again!";
}
+
+ } else { // Else we aren't using registration codes! FREE SERVERS
+
+ $servercount = $servercount + 1;
+ if ($servercount < 10) {
+ $usergenid = "00" . $servercount;
+ } else if ($servercount < 100) {
+ $usergenid = "0" . $servercount;
+ } else {
+ $usergenid = $servercount;
+ }
+
+ file_put_contents("mtm_db/users/usercount", $servercount);
+ file_put_contents("mtm_db/users/" . stripslashes(htmlentities($_POST['username'])) . ".php", "
+ free.minetest.host is a 100% cost-free, ad-free Minetest / Multicraft Server Hosting platform!
+ With the ability to casually click mods you'd wish to use, which gamepack to start with, and more!
+ You're provided with a full user control panel and can operate your server in an easy-to-use fashion!
+