add "kickEveryone" debug setting

This commit is contained in:
Mister_Nebula 2022-08-26 12:52:26 +01:00
parent 6cd337f3db
commit b832992ab5
2 changed files with 10 additions and 0 deletions

View File

@ -71,6 +71,13 @@ public class PlayerJoinMessage : QSBMessage
{
if (QSBCore.IsHost)
{
if (QSBCore.DebugSettings.KickEveryone)
{
DebugLog.ToConsole($"Kicking {PlayerName} because of DebugSettings.KickEveryone", MessageType.Error);
new PlayerKickMessage(From, "This server has DebugSettings.KickEveryone enabled.").Send();
return;
}
if (QSBVersion != QSBCore.QSBVersion)
{
DebugLog.ToConsole($"Error - Client {PlayerName} connecting with wrong QSB version. (Client:{QSBVersion}, Server:{QSBCore.QSBVersion})", MessageType.Error);

View File

@ -26,6 +26,9 @@ public class DebugSettings
[JsonProperty("skipTitleScreen")]
public bool SkipTitleScreen;
[JsonProperty("kickEveryone")]
public bool KickEveryone;
[JsonProperty("debugMode")]
public bool DebugMode;