Add various chat related checks

This commit is contained in:
SilicaAndPina 2021-04-05 11:51:08 +12:00
parent 2e4ba0b82d
commit 5fc313657d
8 changed files with 114 additions and 3 deletions

View file

@ -124,6 +124,7 @@ namespace HISP.Game.Chat
try{
User bannedUser = GameServer.GetUserByName(args[0]);
bannedUser.LoggedinClient.Kick(Messages.KickReasonBanned);
}
catch(KeyNotFoundException){};
@ -357,7 +358,10 @@ namespace HISP.Game.Chat
string moves = string.Join(" ", args).ToLower();
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message.Substring(1));
new Dance(user, moves);
if (user.ActiveDance != null)
user.ActiveDance.Dispose();
user.ActiveDance = new Dance(user, moves);
byte[] chatPacket = PacketBuilder.CreateChat(formattedmessage, PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);