aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Server/RandomUserGenerator.cs
diff options
context:
space:
mode:
authorpfg <[email protected]>2017-03-07 17:33:44 -0800
committerpfg <[email protected]>2017-03-07 17:33:44 -0800
commitb20d77edd1227b2ce53b65b0752972bd65a36e84 (patch)
treeb15615591e009c9aa472ba5d95374a064c50e8b1 /ShiftOS.Server/RandomUserGenerator.cs
parent4989356d6797335b44060ae94c9af34404773506 (diff)
parent449d43d22c1d12ce6aa0243fbb4ea94481ff8f4c (diff)
downloadshiftos_thereturn-b20d77edd1227b2ce53b65b0752972bd65a36e84.tar.gz
shiftos_thereturn-b20d77edd1227b2ce53b65b0752972bd65a36e84.tar.bz2
shiftos_thereturn-b20d77edd1227b2ce53b65b0752972bd65a36e84.zip
Merge branch 'master' of https://github.com/shiftos-game/ShiftOS
Diffstat (limited to 'ShiftOS.Server/RandomUserGenerator.cs')
-rw-r--r--ShiftOS.Server/RandomUserGenerator.cs22
1 files changed, 16 insertions, 6 deletions
diff --git a/ShiftOS.Server/RandomUserGenerator.cs b/ShiftOS.Server/RandomUserGenerator.cs
index afaee46..3a62f9c 100644
--- a/ShiftOS.Server/RandomUserGenerator.cs
+++ b/ShiftOS.Server/RandomUserGenerator.cs
@@ -114,11 +114,12 @@ namespace ShiftOS.Server
sve.Codepoints = rnd.Next(startCP, maxAmt);
//FS treasure generation.
-
+ /*
//create a ramdisk dir
var dir = new ShiftOS.Objects.ShiftFS.Directory();
//name the directory after the user
dir.Name = sve.Username;
+ dir.permissions = Objects.ShiftFS.Permissions.All;
//json the object and mount
string json = Newtonsoft.Json.JsonConvert.SerializeObject(dir);
//mount it to the MUD
@@ -180,16 +181,19 @@ namespace ShiftOS.Server
WriteAllBytes(kv.Value, File.ReadAllBytes(file));
}
}
- }
+ }*/
//save the save file to disk.
File.WriteAllText("deadsaves/" + sve.Username + ".save", Newtonsoft.Json.JsonConvert.SerializeObject(sve, Newtonsoft.Json.Formatting.Indented));
//We don't care about the encryption algorithm because these saves can't be logged into as regular users.
+ /*
//Now we export the mount.
string exportedMount = ExportMount(mountid);
//And save it to disk.
File.WriteAllText("deadsaves/" + sve.Username + ".mfs", exportedMount);
+ */
+
Thread.Sleep((60 * 60) * 1000); //approx. 1 hour.
@@ -214,12 +218,18 @@ namespace ShiftOS.Server
targets = new Dictionary<string, string>();
foreach(var dir in dirs)
{
- string sDir = dir.Replace("\\", "/");
- while (!sDir.StartsWith("shiftnet/"))
+ if (!string.IsNullOrWhiteSpace(dir))
{
- sDir = sDir.Remove(0, 1);
+ string sDir = dir.Replace("\\", "/");
+ if (sDir.Contains("shiftnet"))
+ {
+ while (!sDir.StartsWith("shiftnet"))
+ {
+ sDir = sDir.Remove(0, 1);
+ }
+ targets.Add(dir, output + "/" + sDir);
+ }
}
- targets.Add(dir, output + "/" + sDir);
}
}