mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-06 21:25:42 +12:00
fix empty chat messages
This commit is contained in:
parent
8b1f73625a
commit
04fe4945fb
1 changed files with 8 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue