mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-22 21:21:28 +00:00
Add the ability to disable matchmaking in configuration
This commit is contained in:
parent
b4d67d4016
commit
5035dbb63d
3 changed files with 12 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
#nullable enable
|
||||
using System.Text.Json;
|
||||
using LBPUnion.ProjectLighthouse.Configuration;
|
||||
using LBPUnion.ProjectLighthouse.Database;
|
||||
using LBPUnion.ProjectLighthouse.Extensions;
|
||||
using LBPUnion.ProjectLighthouse.Helpers;
|
||||
|
@ -42,6 +43,9 @@ public class MatchController : ControllerBase
|
|||
UserEntity? user = await this.database.UserFromGameToken(token);
|
||||
if (user == null) return this.Forbid();
|
||||
|
||||
// Do not allow matchmaking if it has been disabled
|
||||
if (!ServerConfiguration.Instance.Matchmaking.MatchmakingEnabled) return this.Forbid();
|
||||
|
||||
#region Parse match data
|
||||
|
||||
// Example POST /match: [UpdateMyPlayerData,["Player":"FireGamer9872"]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue