From e1c19b792c71e8e1b5e3d3917ba3f4f465d5e359 Mon Sep 17 00:00:00 2001 From: AlanMoonbase Date: Thu, 27 Feb 2025 18:57:30 -0800 Subject: [PATCH] require authentication send ``SMF`` if chat ban is detected --- src/CommandHandlers/ChatMessageHandler.cs | 2 +- src/appsettings.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CommandHandlers/ChatMessageHandler.cs b/src/CommandHandlers/ChatMessageHandler.cs index d573a5b..066f574 100644 --- a/src/CommandHandlers/ChatMessageHandler.cs +++ b/src/CommandHandlers/ChatMessageHandler.cs @@ -52,7 +52,7 @@ class ChatMessageHandler : CommandHandler { UserBanType? banType = response.Content.ReadFromJsonAsync().Result; if (banType != null && (banType == UserBanType.IndefiniteOpenChatBan || banType == UserBanType.TemporaryOpenChatBan)) - { client.Send(Utils.ArrNetworkPacket(new string[] { "CB", "-1", "1" }, "CB")); return; } + { client.Send(Utils.ArrNetworkPacket(new string[] { "SMF", "-1", "CB", "1", "Sorry, You've Been Banned From Using Type Chat", "1" }, "SMF")); return; } client.Room.Send(Utils.BuildChatMessage(client.PlayerData.Uid, message, client.PlayerData.DiplayName), client); diff --git a/src/appsettings.json b/src/appsettings.json index a9a6b85..db66cae 100644 --- a/src/appsettings.json +++ b/src/appsettings.json @@ -61,7 +61,7 @@ "// Authentication Optional": "authentication is required only for moderation activities", "// Authentication RequiredForChat": "authentication is required only for moderation activities and using chat (if chat is enabled)", "// Authentication Required": "authentication is required to connect to mmo", - "Authentication": "Disabled", + "Authentication": "Required", "// ApiUrl": "SoDOff API server URL for authentication calls", "ApiUrl": "http://localhost:5000",