chat commands: fix cmb to use correct endpoint
This commit is contained in:
@@ -1407,21 +1407,11 @@ public class ChatCommandsPlugin extends Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ChatMessageType type = chatMessage.getType();
|
final HiscoreLookup lookup = getCorrectLookupFor(chatMessage);
|
||||||
|
|
||||||
String player;
|
|
||||||
if (type == ChatMessageType.PRIVATECHATOUT)
|
|
||||||
{
|
|
||||||
player = client.getLocalPlayer().getName();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player = Text.sanitize(chatMessage.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
HiscoreResult playerStats = hiscoreClient.lookup(player);
|
HiscoreResult playerStats = hiscoreClient.lookup(lookup.getName(), lookup.getEndpoint());
|
||||||
|
|
||||||
if (playerStats == null)
|
if (playerStats == null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user