Post messages when connecting to a network.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 10 Aug 2013 20:56:42 +0000 (22:56 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 10 Aug 2013 20:56:42 +0000 (22:56 +0200)
src/main/java/net/pterodactylus/xdcc/core/Core.java

index 240beb1..b02398d 100644 (file)
@@ -443,13 +443,17 @@ public class Core extends AbstractExecutionThreadService {
 
                /* found network? */
                if (!network.isPresent()) {
+                       eventBus.post(new GenericMessage(String.format("Connected to unknown network: %s", connectionEstablished.connection().hostname())));
                        return;
                }
 
+               eventBus.post(new GenericMessage(String.format("Connected to network %s.", network.get().name())));
+
                /* join all channels on this network. */
                for (Channel channel : channels) {
                        if (channel.network().equals(network.get())) {
                                try {
+                                       eventBus.post(new GenericMessage(String.format("Trying to join %s on %s...", channel.name(), network.get().name())));
                                        connectionEstablished.connection().joinChannel(channel.name());
                                } catch (IOException ioe1) {
                                        logger.log(Level.WARNING, String.format("Could not join %s on %s!", channel.name(), network.get().name()), ioe1);