mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-07 21:55:42 +12:00
Fix /player not being StartsWith
This commit is contained in:
parent
4d85001657
commit
7ced894158
1 changed files with 16 additions and 1 deletions
|
@ -5796,7 +5796,21 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
channel = Chat.ChatChannel.Dm;
|
channel = Chat.ChatChannel.Dm;
|
||||||
nameTo = channelString.Substring(1);
|
string find = channelString.Substring(1);
|
||||||
|
nameTo = "";
|
||||||
|
// Search for closest user
|
||||||
|
foreach (GameClient client in GameClient.ConnectedClients)
|
||||||
|
{
|
||||||
|
if (client.LoggedIn)
|
||||||
|
{
|
||||||
|
if (client.LoggedinUser.Username.StartsWith(find))
|
||||||
|
{
|
||||||
|
nameTo = client.LoggedinUser.Username;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6414,6 +6428,7 @@ namespace HISP.Server
|
||||||
{
|
{
|
||||||
InventoryItem itm = sender.LoggedinUser.Inventory.GetItemByItemId(Item.DorothyShoes);
|
InventoryItem itm = sender.LoggedinUser.Inventory.GetItemByItemId(Item.DorothyShoes);
|
||||||
Item.UseItem(sender.LoggedinUser, itm.ItemInstances[0]);
|
Item.UseItem(sender.LoggedinUser, itm.ItemInstances[0]);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue