add the ability to change channels w / commands

This commit is contained in:
SilicaAndPina 2021-04-05 13:55:22 +12:00
parent cd0dfb588e
commit fe5e62daa7
2 changed files with 7 additions and 3 deletions

View file

@ -390,7 +390,7 @@ namespace HISP.Game.Chat
{
if (client.LoggedIn)
if (!client.LoggedinUser.MutePrivateMessage && !client.LoggedinUser.MuteAll)
if (client.LoggedinUser.Username == to)
if (client.LoggedinUser.Username.ToLower() == to.ToLower())
recipiants.Add(client);
}
return recipiants.ToArray();

View file

@ -5501,7 +5501,11 @@ namespace HISP.Server
if(channel == Chat.ChatChannel.Dm)
{
if(recipiants.Length <= 0)
try
{
nameTo = GetUserByName(nameTo).Username;
}
catch(KeyNotFoundException)
{
byte[] cantFindPlayer = PacketBuilder.CreateChat(Messages.CantFindPlayerToPrivateMessage, PacketBuilder.CHAT_BOTTOM_RIGHT);
sender.SendPacket(cantFindPlayer);
@ -7010,7 +7014,7 @@ namespace HISP.Server
{
if(client.LoggedIn)
{
if (client.LoggedinUser.Username == username)
if (client.LoggedinUser.Username.ToLower() == username.ToLower())
return client.LoggedinUser;
}
}