-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3004066
commit 40c6bb6
Showing
8 changed files
with
100 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/main/java/org/kitteh/irc/client/library/event/user/DCCRequestEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package org.kitteh.irc.client.library.event.user; | ||
|
||
import org.kitteh.irc.client.library.Client; | ||
import org.kitteh.irc.client.library.element.ServerMessage; | ||
import org.kitteh.irc.client.library.element.User; | ||
import org.kitteh.irc.client.library.event.abstractbase.ActorEventBase; | ||
import org.kitteh.irc.client.library.util.Sanity; | ||
|
||
import javax.annotation.Nonnull; | ||
import java.util.List; | ||
|
||
public class DCCRequestEvent extends ActorEventBase<User> { | ||
private final String type; | ||
private final String ip; | ||
private final int port; | ||
|
||
public DCCRequestEvent(@Nonnull Client client, @Nonnull List<ServerMessage> originalMessages, @Nonnull String type, @Nonnull String ip, int port, @Nonnull User actor) { | ||
super(client, originalMessages, actor); | ||
Sanity.nullCheck(type, "type cannot be null"); | ||
Sanity.nullCheck(ip, "ip cannot be null"); | ||
this.type = type; | ||
this.ip = ip; | ||
this.port = port; | ||
} | ||
|
||
public String getType() { | ||
return this.type; | ||
} | ||
|
||
public String getIp() { | ||
return this.ip; | ||
} | ||
|
||
public int getPort() { | ||
return this.port; | ||
} | ||
|
||
/** | ||
* Accepts the request and connect to the socket. | ||
* | ||
* <p>This will trigger {@link DCCConnectedEvent} if successful and | ||
* {@link DCCFailedEvent} otherwise.</p> | ||
*/ | ||
public void accept() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters