Call this V1.2
This commit is contained in:
parent
14bebfe4c0
commit
e963752b0e
@ -56,6 +56,9 @@ Mods / Gamepacks
|
|||||||
|
|
||||||
ChangeLog
|
ChangeLog
|
||||||
----
|
----
|
||||||
|
2/03/2021 - v1.2
|
||||||
|
* Can disable and enable registration tokens for register in config.php
|
||||||
|
|
||||||
2/03/2021 - v1.1b
|
2/03/2021 - v1.1b
|
||||||
* CSS clean-up
|
* CSS clean-up
|
||||||
* Admin configuration of server max slots -> config.php
|
* Admin configuration of server max slots -> config.php
|
||||||
|
23
config.php
23
config.php
@ -2,19 +2,20 @@
|
|||||||
///////
|
///////
|
||||||
// MTSM - Minetest Server Manager
|
// MTSM - Minetest Server Manager
|
||||||
// (C) Chris Dorman, CC-BY-SA v3.0 (2021)
|
// (C) Chris Dorman, CC-BY-SA v3.0 (2021)
|
||||||
// https://github.com/Pentium44/MTSM
|
// https://notabug.org/Pentium44/MTSM
|
||||||
// Version: 1.0
|
|
||||||
///////
|
///////
|
||||||
|
|
||||||
$mtsmtitle = "webpanel ~ panel.edgy1.net"; // MTSM Title
|
include_once("version.php");
|
||||||
$desc = "Simple, ad-free, and lightweight Minetest hosting solution that's number one for YOU! "
|
|
||||||
|
$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.
|
. $mtsmtitle . " is powered by MTSM."; // Description of the panel.
|
||||||
$domain = "https://panel.edgy1.net"; // where is MTSM operating?
|
$domain = "https://free.minetest.host"; // where is MTSM operating?
|
||||||
$version = "1.1b"; // version of MTSM
|
$defaultip = "free.minetest.host"; // Default IP for user servers
|
||||||
$defaultip = "fi.edgy1.net"; // Default IP for user servers
|
$maxservers = "50"; // max server count.
|
||||||
$maxservers = "100"; // max server count.
|
|
||||||
$portrange = "30"; // <port range>xxx example 30, would be 30001 for port usage on the first user
|
$portrange = "30"; // <port range>xxx example 30, would be 30001 for port usage on the first user
|
||||||
$max_slot_count = "50"; // Maximum amount of slots per servers of a user, set in minetest.conf
|
$max_slot_count = "8"; // Maximum amount of slots per servers of a user, set in minetest.conf
|
||||||
|
$reg_token_required = "false"; // Require token provided by admin for registration (nice for paid servers)
|
||||||
|
|
||||||
// Default "admin" account password
|
// Default "admin" account password
|
||||||
$admin_passwd = "ChangeM3!";
|
$admin_passwd = "ChangeM3!";
|
||||||
@ -25,7 +26,7 @@ $allowed_file_extension = "zip"; // Allowed archive extension type.
|
|||||||
// File mimetype is checked by the index upload-modzip function
|
// File mimetype is checked by the index upload-modzip function
|
||||||
|
|
||||||
// IRC settings, for IRC plugin
|
// IRC settings, for IRC plugin
|
||||||
$default_irc_server = "irc.edgy1.net";
|
$default_irc_server = "irc.cddo.cc";
|
||||||
$default_irc_port = "6667";
|
$default_irc_port = "1337";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
26
index.php
26
index.php
@ -2,7 +2,7 @@
|
|||||||
// MTSM - Minetest Server Manager - Server management frontend
|
// MTSM - Minetest Server Manager - Server management frontend
|
||||||
// (C) Chris Dorman, 2021
|
// (C) Chris Dorman, 2021
|
||||||
// License: CC-BY-SA version 3.0
|
// License: CC-BY-SA version 3.0
|
||||||
// http://github.com/Pentium44/MTSM
|
// http://notabug.org/Pentium44/MTSM
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
include "config.php";
|
include "config.php";
|
||||||
@ -617,6 +617,9 @@ else if(isset($_GET['do']))
|
|||||||
echo "<h3>Enable mods from local repository</h3>";
|
echo "<h3>Enable mods from local repository</h3>";
|
||||||
modsForm();
|
modsForm();
|
||||||
|
|
||||||
|
// Disable user uploads of zip files when given to general public.
|
||||||
|
if($reg_token_required == "true") {
|
||||||
|
|
||||||
echo "<h3>Enable user available mods</h3>";
|
echo "<h3>Enable user available mods</h3>";
|
||||||
// In case someone fucks there shit up
|
// In case someone fucks there shit up
|
||||||
echo "<a href='index.php?do=reset-user-mods' class='button'>Delete user mods</a><br />";
|
echo "<a href='index.php?do=reset-user-mods' class='button'>Delete user mods</a><br />";
|
||||||
@ -624,6 +627,8 @@ else if(isset($_GET['do']))
|
|||||||
|
|
||||||
echo "<h3>Personal mod upload</h3>";
|
echo "<h3>Personal mod upload</h3>";
|
||||||
modUploadForm();
|
modUploadForm();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo "ERROR: Server not found!";
|
echo "ERROR: Server not found!";
|
||||||
@ -793,6 +798,9 @@ else if(isset($_GET['do']))
|
|||||||
{
|
{
|
||||||
if(filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
|
if(filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
|
||||||
include_once("mtm_db/token.php");
|
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) {
|
if(stripslashes(htmlentities($_POST['codeword'])) == $reg_token) {
|
||||||
$servercount = $servercount + 1;
|
$servercount = $servercount + 1;
|
||||||
if ($servercount < 10) {
|
if ($servercount < 10) {
|
||||||
@ -813,6 +821,22 @@ else if(isset($_GET['do']))
|
|||||||
{
|
{
|
||||||
echo "ERROR: Registration code incorrect, please try again!";
|
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", "<?php\n\$user_handle = \"" . stripslashes(htmlentities($_POST['user$
|
||||||
|
header("Location: index.php");
|
||||||
|
} // End registration tokens via config.php
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
<p style="padding: 5px;">
|
||||||
|
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!
|
||||||
|
</p>
|
||||||
|
|
||||||
<form action="https://www.paypal.com/donate" method="post" target="_top">
|
<form action="https://www.paypal.com/donate" method="post" target="_top">
|
||||||
<input type="hidden" name="cmd" value="_donations" />
|
<input type="hidden" name="cmd" value="_donations" />
|
||||||
<input type="hidden" name="business" value="cdorm245@gmail.com" />
|
<input type="hidden" name="business" value="cdorm245@gmail.com" />
|
||||||
|
5
version.php
Normal file
5
version.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
// We're gonna stuff this here so git shuts up on pull requests.
|
||||||
|
|
||||||
|
$version = "1.2"; // version of MTSM
|
||||||
|
?>
|
Loading…
x
Reference in New Issue
Block a user