hiscore plugin: add Lookup to ignore list
This commit is contained in:
@@ -66,7 +66,7 @@ public class HiscorePlugin extends Plugin
|
||||
{
|
||||
private static final String LOOKUP = "Lookup";
|
||||
private static final String KICK_OPTION = "Kick";
|
||||
private static final ImmutableList<String> AFTER_OPTIONS = ImmutableList.of("Message", "Add ignore", "Remove friend", KICK_OPTION);
|
||||
private static final ImmutableList<String> AFTER_OPTIONS = ImmutableList.of("Message", "Add ignore", "Remove friend", "Delete", KICK_OPTION);
|
||||
private static final Pattern BOUNTY_PATTERN = Pattern.compile("<col=ff0000>You've been assigned a target: (.*)</col>");
|
||||
|
||||
@Inject
|
||||
@@ -177,11 +177,10 @@ public class HiscorePlugin extends Plugin
|
||||
|
||||
if (groupId == WidgetInfo.FRIENDS_LIST.getGroupId() || groupId == WidgetInfo.CLAN_CHAT.getGroupId() ||
|
||||
groupId == WidgetInfo.CHATBOX.getGroupId() && !KICK_OPTION.equals(option) || //prevent from adding for Kick option (interferes with the raiding party one)
|
||||
groupId == WidgetInfo.RAIDING_PARTY.getGroupId() || groupId == WidgetInfo.PRIVATE_CHAT_MESSAGE.getGroupId())
|
||||
groupId == WidgetInfo.RAIDING_PARTY.getGroupId() || groupId == WidgetInfo.PRIVATE_CHAT_MESSAGE.getGroupId() ||
|
||||
groupId == WidgetInfo.IGNORE_LIST.getGroupId())
|
||||
{
|
||||
boolean after;
|
||||
|
||||
if (!AFTER_OPTIONS.contains(option))
|
||||
if (!AFTER_OPTIONS.contains(option) || (option.equals("Delete") && groupId != WidgetInfo.IGNORE_LIST.getGroupId()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user