aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Server/SaveManager.cs
diff options
context:
space:
mode:
authorMichael VanOverbeek <[email protected]>2017-05-21 12:21:41 +0000
committerMichael VanOverbeek <[email protected]>2017-05-21 12:21:41 +0000
commit31cc9148dd23737df16d8456a42d003cd31dd488 (patch)
treef699644cd0384e80a673099374649b7350d6e02d /ShiftOS.Server/SaveManager.cs
parent3b1c71e6710c06a9e390f449589bd30cb2f4b7dd (diff)
downloadshiftos_thereturn-31cc9148dd23737df16d8456a42d003cd31dd488.tar.gz
shiftos_thereturn-31cc9148dd23737df16d8456a42d003cd31dd488.tar.bz2
shiftos_thereturn-31cc9148dd23737df16d8456a42d003cd31dd488.zip
holy ashit
Diffstat (limited to 'ShiftOS.Server/SaveManager.cs')
-rw-r--r--ShiftOS.Server/SaveManager.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/ShiftOS.Server/SaveManager.cs b/ShiftOS.Server/SaveManager.cs
index 63aa2bf..acf28a5 100644
--- a/ShiftOS.Server/SaveManager.cs
+++ b/ShiftOS.Server/SaveManager.cs
@@ -189,7 +189,7 @@ namespace ShiftOS.Server
//Update the shiftos website with the user's codepoints.
if (!string.IsNullOrWhiteSpace(sav.UniteAuthToken))
{
- var wreq = WebRequest.Create("http://getshiftos.ml/API/SetCodepoints/" + sav.Codepoints.ToString());
+ var wreq = WebRequest.Create(UserConfig.Get().UniteUrl + "/API/SetCodepoints/" + sav.Codepoints.ToString());
wreq.Headers.Add("Authentication: Token " + sav.UniteAuthToken);
wreq.GetResponse();
}
@@ -216,6 +216,21 @@ namespace ShiftOS.Server
WriteEncFile(savefile, JsonConvert.SerializeObject(save));
}
+ try
+ {
+ var wr = System.Net.HttpWebRequest.Create("http://getshiftos.ml/API/GetCodepoints");
+ wr.Headers.Add("Authentication: Token " + save.UniteAuthToken);
+ var response = wr.GetResponse();
+ using (var rstr = response.GetResponseStream())
+ {
+ using (var sreader = new StreamReader(rstr))
+ {
+ long cp = Convert.ToInt64(sreader.ReadToEnd());
+ save.Codepoints = cp;
+ }
+ }
+ }
+ catch { }
Program.server.DispatchTo(new Guid(guid), new NetObject("mud_savefile", new ServerMessage
{