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(); Packets.ChatMessage packet = new();
packet.Unpack(data); packet.Unpack(data);
_worker.QueueJob(() => API.Events.InvokeOnChatMessage(packet, sender));
ChatMessageReceived(packet.Username,packet.Message, sender); ChatMessageReceived(packet.Username,packet.Message, sender);
} }
break; break;
@ -783,7 +782,9 @@ namespace RageCoop.Server
return; return;
} }
message = message.Replace("~", ""); message = message.Replace("~", "");
_worker.QueueJob(() => API.Events.InvokeOnChatMessage(packet, sender));
var msg=MainNetServer.CreateMessage(); var msg=MainNetServer.CreateMessage();
new Packets.ChatMessage() new Packets.ChatMessage()
{ {