mirror of
https://github.com/SoDOff-Project/sodoff-mmo.git
synced 2025-10-11 08:18:49 -07:00
config option for canned chat
This commit is contained in:
parent
a198bd8e9e
commit
a94e5f75e0
@ -7,7 +7,7 @@ namespace sodoffmmo.CommandHandlers;
|
|||||||
[CommandHandler(7)]
|
[CommandHandler(7)]
|
||||||
class GenericMessageHandler : CommandHandler {
|
class GenericMessageHandler : CommandHandler {
|
||||||
public override Task Handle(Client client, NetworkObject receivedObject) {
|
public override Task Handle(Client client, NetworkObject receivedObject) {
|
||||||
if (!Configuration.ServerConfiguration.EnableChat && receivedObject.Get<string>("m").StartsWith("C:"))
|
if (!Configuration.ServerConfiguration.EnableCannedChat && receivedObject.Get<string>("m").StartsWith("C:"))
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
NetworkPacket packet = NetworkObject.WrapObject(0, 7, receivedObject).Serialize();
|
NetworkPacket packet = NetworkObject.WrapObject(0, 7, receivedObject).Serialize();
|
||||||
client.Room.Send(packet);
|
client.Room.Send(packet);
|
||||||
|
@ -43,6 +43,7 @@ internal sealed class ServerConfiguration {
|
|||||||
public int RacingMainLobbyTimer { get; set; } = 15;
|
public int RacingMainLobbyTimer { get; set; } = 15;
|
||||||
public int PingDelay { get; set; } = 17;
|
public int PingDelay { get; set; } = 17;
|
||||||
public bool EnableChat { get; set; } = true;
|
public bool EnableChat { get; set; } = true;
|
||||||
|
public bool EnableCannedChat { get; set; } = true;
|
||||||
public bool AllowChaos { get; set; } = false;
|
public bool AllowChaos { get; set; } = false;
|
||||||
public AuthenticationMode Authentication { get; set; } = AuthenticationMode.Disabled;
|
public AuthenticationMode Authentication { get; set; } = AuthenticationMode.Disabled;
|
||||||
public string ApiUrl { get; set; } = "";
|
public string ApiUrl { get; set; } = "";
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
"// EnableChat": "When true, in-game chat will be enabled",
|
"// EnableChat": "When true, in-game chat will be enabled",
|
||||||
"EnableChat": true,
|
"EnableChat": true,
|
||||||
|
"EnableCannedChat": true,
|
||||||
|
|
||||||
"// EventName": "World event name send to client (can be used to select ship type after modding WorldEventScoutAttack in client)",
|
"// EventName": "World event name send to client (can be used to select ship type after modding WorldEventScoutAttack in client)",
|
||||||
"EventName": "ScoutAttack",
|
"EventName": "ScoutAttack",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user