*/
@Subscribe
public void dccSendReceived(DccSendReceived dccSendReceived) {
+ Optional<Network> network = getNetwork(dccSendReceived.connection());
+ if (!network.isPresent()) {
+ return;
+ }
+
+ Download download = downloads.get(dccSendReceived.filename());
+ if (download == null) {
+ /* unknown download, ignore. */
+ return;
+ }
+
logger.info(String.format("Starting download of %s.", dccSendReceived.filename()));
try {
File outputFile = new File(temporaryDirectory, dccSendReceived.filename());