Swap parameters of event.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 16 Oct 2014 20:36:33 +0000 (22:36 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 16 Oct 2014 20:36:33 +0000 (22:36 +0200)
src/main/java/net/pterodactylus/irc/Connection.java
src/main/java/net/pterodactylus/irc/event/ChannelMessageReceived.java

index f6b7913..931acc0 100644 (file)
@@ -406,7 +406,7 @@ public class Connection extends AbstractExecutionThreadService implements Servic
                                        } else if (!prefixHandler.isChannel(recipient)) {
                                                eventBus.post(new PrivateMessageReceived(this, reply.source().get(), message));
                                        } else {
-                                               eventBus.post(new ChannelMessageReceived(this, recipient, reply.source().get(), message));
+                                               eventBus.post(new ChannelMessageReceived(this, reply.source().get(), recipient, message));
                                        }
 
                                } else if (command.equalsIgnoreCase("NOTICE")) {
index 5cb6349..92aa293 100644 (file)
@@ -38,14 +38,14 @@ public class ChannelMessageReceived extends AbstractChannelEvent {
         *
         * @param connection
         *              The connection the event occured on
-        * @param channel
-        *              The channel of the message
         * @param source
         *              The source of the message
+        * @param channel
+ *             The channel of the message
         * @param message
         *              The text of the message
         */
-       public ChannelMessageReceived(Connection connection, String channel, Source source, String message) {
+       public ChannelMessageReceived(Connection connection, Source source, String channel, String message) {
                super(connection, channel);
                this.source = source;
                this.message = message;