--- /dev/null
+/*
+ * XdccDownloader - MessageReceived.java - Copyright © 2013 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.irc.event;
+
+import net.pterodactylus.irc.Connection;
+import net.pterodactylus.irc.Source;
+
+/**
+ * Notifies a listener that a channel message was received.
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class ChannelMessageReceived extends AbstractChannelEvent {
+
+ /** The source of the message. */
+ private final Source source;
+
+ /** The text of the message. */
+ private final String message;
+
+ /**
+ * Creates a new channel message received event.
+ *
+ * @param connection
+ * The connection the event occured on
+ * @param channel
+ * The channel of the message
+ * @param source
+ * The source of the message
+ * @param message
+ * The text of the message
+ */
+ public ChannelMessageReceived(Connection connection, String channel, Source source, String message) {
+ super(connection, channel);
+ this.source = source;
+ this.message = message;
+ }
+
+ //
+ // ACCESSORS
+ //
+
+ /**
+ * Returns the source of the message.
+ *
+ * @return The source of the message
+ */
+ public Source source() {
+ return source;
+ }
+
+ /**
+ * Returns the text of the message.
+ *
+ * @return The text of the message
+ */
+ public String message() {
+ return message;
+ }
+
+}
--- /dev/null
+/*
+ * XdccDownloader - PrivateMessageReceived.java - Copyright © 2013 David Roden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.irc.event;
+
+import net.pterodactylus.irc.Connection;
+import net.pterodactylus.irc.Source;
+
+/**
+ * Notifies a listener that a new private message was received.
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public class PrivateMessageReceived extends AbstractConnectionEvent {
+
+ /** The source of the message. */
+ private final Source source;
+
+ /** The text of the message. */
+ private final String message;
+
+ /**
+ * Creates a new private message received event.
+ *
+ * @param connection
+ * The connection the event occured on
+ * @param source
+ * The source of the message
+ * @param message
+ * The text of the message
+ */
+ public PrivateMessageReceived(Connection connection, Source source, String message) {
+ super(connection);
+ this.source = source;
+ this.message = message;
+ }
+
+ //
+ // ACCESSORS
+ //
+
+ /**
+ * Returns the source of the message.
+ *
+ * @return The source of the message
+ */
+ public Source source() {
+ return source;
+ }
+
+ /**
+ * Returns the text of the message.
+ *
+ * @return The text of the message
+ */
+ public String message() {
+ return message;
+ }
+
+}