X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Firc%2Fevent%2FClientQuit.java;fp=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Firc%2Fevent%2FClientQuit.java;h=d7f7aff8f22e6df557fce2c0e0ae2a3788319ec5;hb=f1762992ce7d64ad321cf95c92796577d0819b80;hp=0000000000000000000000000000000000000000;hpb=aa82fb99f45b296163464bff96bd130b7e02ce75;p=xudocci.git diff --git a/src/main/java/net/pterodactylus/irc/event/ClientQuit.java b/src/main/java/net/pterodactylus/irc/event/ClientQuit.java new file mode 100644 index 0000000..d7f7aff --- /dev/null +++ b/src/main/java/net/pterodactylus/irc/event/ClientQuit.java @@ -0,0 +1,74 @@ +/* + * XdccDownloader - ClientQuit.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 . + */ + +package net.pterodactylus.irc.event; + +import net.pterodactylus.irc.Connection; +import net.pterodactylus.irc.Source; + +/** + * Notifies a listener that a client has quit. + * + * @author David ‘Bombe’ Roden + */ +public class ClientQuit extends AbstractConnectionEvent { + + /** The client that quit. */ + private final Source client; + + /** The message given by the client. */ + private final String message; + + /** + * Creates a new client quit event. + * + * @param connection + * The connection on which the event occured + * @param client + * The client that quit + * @param message + * The message given by the client + */ + public ClientQuit(Connection connection, Source client, String message) { + super(connection); + this.client = client; + this.message = message; + } + + // + // ACCESSORS + // + + /** + * Returns the client that quit. + * + * @return The client that quit + */ + public Source client() { + return client; + } + + /** + * Returns the message given by the client. + * + * @return The message given by the client + */ + public String message() { + return message; + } + +}