fix empty chat messages

This commit is contained in:
Bluzume 2021-10-27 23:11:06 -04:00
parent 8b1f73625a
commit 04fe4945fb

View file

@ -5691,12 +5691,19 @@ namespace HISP.Server
message = Chat.GetDmMessage(message);
}
if (message == "")
return;
if (message.StartsWith("/"))
{
string channelString = message.Split(' ')[0].ToLower();
string newMessage = string.Join(' ', message.Split(' ').Skip(1));
message = newMessage.Trim();
switch(channelString)
if (message == "")
channelString = "/";
switch (channelString)
{
case "/$":
case "/ads":
@ -5749,9 +5756,6 @@ namespace HISP.Server
message = message.Trim();
if (message == "")
return;
if (channel == Chat.ChatChannel.All && message.Length > 150)
{
byte[] tooLong = PacketBuilder.CreateChat(Messages.GlobalChatTooLong, PacketBuilder.CHAT_BOTTOM_RIGHT);