import net.pterodactylus.irc.event.DccDownloadFinished;
import net.pterodactylus.irc.event.DccSendReceived;
import net.pterodactylus.irc.event.NicknameChanged;
+import net.pterodactylus.irc.event.PrivateNoticeReceived;
import net.pterodactylus.irc.event.PrivateMessageReceived;
import net.pterodactylus.irc.util.MessageCleaner;
import net.pterodactylus.irc.util.RandomNickname;
}
/**
+ * Sends a message to all console when a notice was received.
+ *
+ * @param privateNoticeReceived
+ * The notice received event
+ */
+ @Subscribe
+ public void privateNoticeReceived(PrivateNoticeReceived privateNoticeReceived) {
+ Optional<Network> network = getNetwork(privateNoticeReceived.connection());
+ if (!network.isPresent()) {
+ return;
+ }
+
+ eventBus.post(new GenericMessage(String.format("Notice from %s (%s): %s", privateNoticeReceived.reply().source(), network.get(), privateNoticeReceived.text())));
+ }
+
+ /**
* Starts a DCC download.
*
* @param dccSendReceived