Don't invoke chat message if it's a command

This commit is contained in:
Sardelka9515 2022-07-29 01:08:34 +08:00 committed by GitHub
parent e657a02f7a
commit d7e9ce8ff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -480,7 +480,6 @@ namespace RageCoop.Server
Packets.ChatMessage packet = new();
packet.Unpack(data);
_worker.QueueJob(() => API.Events.InvokeOnChatMessage(packet, sender));
ChatMessageReceived(packet.Username,packet.Message, sender);
}
break;
@ -784,6 +783,8 @@ namespace RageCoop.Server
}
message = message.Replace("~", "");
_worker.QueueJob(() => API.Events.InvokeOnChatMessage(packet, sender));
var msg=MainNetServer.CreateMessage();
new Packets.ChatMessage()
{