From e963752b0e6b27c4f2368f50db04e1104510c54e Mon Sep 17 00:00:00 2001
From: Pentium44 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!
+