diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/IRCPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/IRCPlugin.java index 0b929fd..62fb1a8 100644 --- a/src/main/java/me/chayapak1/chomens_bot/plugins/IRCPlugin.java +++ b/src/main/java/me/chayapak1/chomens_bot/plugins/IRCPlugin.java @@ -187,7 +187,9 @@ public class IRCPlugin extends ListenerAdapter { if (!bot.isConnected() || messageQueue.isEmpty()) return; try { - for (Map.Entry> entry : messageQueue.entrySet()) { + final Map> clonedMap = new HashMap<>(messageQueue); + + for (Map.Entry> entry : clonedMap.entrySet()) { final List logs = entry.getValue(); if (logs.isEmpty()) continue;