Minor DiscordSRV hook fix

This commit is contained in:
cnaude 2017-04-06 22:39:25 -07:00
parent 252050569c
commit f31bec89b7
2 changed files with 4 additions and 3 deletions

View File

@ -37,7 +37,7 @@ public class DiscordListener {
public DiscordListener(PurpleIRC plugin) {
this.plugin = plugin;
}
@Subscribe(priority = ListenerPriority.MONITOR)
public void discordMessageReceived(DiscordGuildMessageReceivedEvent event) {
for (PurpleBot ircBot : plugin.ircBots.values()) {

View File

@ -1770,6 +1770,7 @@ public class PurpleIRC extends JavaPlugin {
if (isPluginEnabled(PL_DISCORDSRV)) {
discHook = new DiscordSRVHook(this);
hookList.add(hookFormat(PL_DISCORDSRV, true));
} else {
hookList.add(hookFormat(PL_DISCORDSRV, false));
}
@ -1779,7 +1780,7 @@ public class PurpleIRC extends JavaPlugin {
} else {
hookList.add(hookFormat(PL_UCHAT, false));
}
Collections.sort(hookList);
}
public void getPurpleHooks(CommandSender sender, boolean colors) {
@ -1791,7 +1792,7 @@ public class PurpleIRC extends JavaPlugin {
sender.sendMessage(header);
} else {
sender.sendMessage(ChatColor.stripColor(header));
}
}
for (String s : hookList) {
if (colors) {
sender.sendMessage(s);