Skip to content

Commit

Permalink
Fixed for trying to use Debug, Beta at all time
Browse files Browse the repository at this point in the history
Fixed Party Controller not reading Namespace
Fixed noupdate would disable Debug
  • Loading branch information
SlejmUr committed Oct 16, 2023
1 parent 32c071d commit 8fbaefc
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
1 change: 0 additions & 1 deletion PayCheck3ServerApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ static void Main(string[] args)
Console.WriteLine("Starting Server(s)!");
ServerManager.UpdateFinished += ServerManager_UpdateFinished;

args = args.Append("-beta").Append("-debug").ToArray();
ArgumentHandler.MainArg(args);
if (ArgumentHandler.AskHelp)
ArgumentHandler.PrintHelp();
Expand Down
4 changes: 3 additions & 1 deletion PayCheckServerLib/Helpers/PartyController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ public static PartyPost.Response CreateParty(PartyPostReq partyPost, string name
LeaderId = rsp.LeaderId,
Members = rsp.Members,
UpdatedAt = rsp.UpdatedAt,
version = rsp.Version
version = rsp.Version,
NameSpace = nameSpace,
Attributes = rsp.Attributes
};
PartySaves.Add(code, saved);
Debugger.PrintInfo("New Party made!");
Expand Down
2 changes: 1 addition & 1 deletion PayCheckServerLib/Responses/DLCs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public partial class DLC_Value



[HTTP("PUT", "/platform/public/namespaces/{namespace}/users/{UserId}/dlc/steam/sync")]
[HTTP("PUT", "/platform/public/namespaces/{namespace}/users/{userid}/dlc/steam/sync")]
public static bool PUT_DLC_SteamSync(HttpRequest _, ServerStruct serverStruct)
{
//var body = JsonConvert.DeserializeObject<PutDLC>(request.Body);
Expand Down
2 changes: 1 addition & 1 deletion PayCheckServerLib/Responses/Parties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static bool PATCH_Parties(HttpRequest request, ServerStruct serverStruct)
var body = JsonConvert.DeserializeObject<PartyPatch>(request.Body);
PartyPost.Response rsp = PartyController.UpdateParty(serverStruct.Parameters["partyid"], body);
ResponseCreator response = new();
response.SetBody(JsonConvert.SerializeObject(rsp));
response.SetBody(JsonConvert.SerializeObject(rsp, Formatting.Indented));
serverStruct.Response = response.GetResponse();
serverStruct.SendResponse();
OnPartyUpdated pld = new()
Expand Down
11 changes: 7 additions & 4 deletions PayCheckServerLib/ServerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ public static void Pre()
{
Debugger.PrintDebug("GiveMeMoney Cheat Activated");
}
if (ArgumentHandler.Debug)
DebugPrinter.PrintToConsole = true;
else
DebugPrinter.PrintToConsole = false;

if (ArgumentHandler.NoUpdate)
{
UpdateFinished?.Invoke(null, true);
return;
}
if (ArgumentHandler.Debug)
{
DebugPrinter.PrintToConsole = true;
}

if (ConfigHelper.ServerConfig.EnableAutoUpdate || ArgumentHandler.ForceUpdate)
Updater.CheckForJsonUpdates();
UpdateFinished?.Invoke(null, true);
Expand All @@ -53,6 +55,7 @@ public static void Start()
if (ConfigHelper.ServerConfig.Hosting.Gstatic)
{
gserver = new(ConfigHelper.ServerConfig.Hosting.IP, 80);
gserver.AttributeToMethods.Merge(Assembly.GetAssembly(typeof(ConfigHelper)));
gserver.Start();
}
}
Expand Down
1 change: 0 additions & 1 deletion PayCheckServerLib/WSController/LobbyControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ public static void Control(byte[] buffer, long offset, long size, WebSocketStruc
if (string.IsNullOrEmpty(item) || item == "\n")
continue;
var kv2 = item.Split(": ");
Console.WriteLine(item);
kv.Add(kv2[0], kv2[1]);
}
Debugger.PrintWebsocket("KVs done!");
Expand Down

0 comments on commit 8fbaefc

Please sign in to comment.