Speed tweaks

master
Pentium44 2021-02-16 23:15:51 -08:00
parent 1d23d2f6fc
commit b72fee563b
1 changed files with 2 additions and 2 deletions

View File

@ -339,16 +339,16 @@ else if(isset($_GET['do']))
// Let them know this might take a while
echo "Please wait, this might take a few seconds depending on the amount of mods being enabled...";
// Check to see which mods where selected, and go from there!
include("mtm_db/users/$username.php");
chdir("mods");
foreach(glob("*") as $modname) {
// server_announce = true
include("mtm_db/users/$username.php");
if(isset($_POST[$modname]) && !is_dir("mtm_db/worlds/$userid/worlds/world/worldmods/" . $_POST[$modname])) {
echo "Copying $modname...";
chdir("..");
file_put_contents("mtm_db/events/$userid", "cp -a mods/$modname mtm_db/worlds/$userid/worlds/world/worldmods/$modname");
chdir("mods");
sleep(2);
sleep(1);
}
}
chdir("..");