Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 25 lines (18 sloc) 0.576 kB
d774bc1 @orktes Added example to readme
orktes authored
1 import org.json.JSONObject;
2 import org.vatvit.irccloud.Connection;
3 import org.vatvit.irccloud.events.EventListener;
4
5 public class Test {
6
7 public static void main(String[] args) {
8 Connection ircConn = new Connection("email@address.com", "password");
9
10 ircConn.addEventListener(new EventListener(){
11 public void onEvent(JSONObject event) {
12 System.out.println("Event: "+event.toString());
13 }
14 });
15
16 if(ircConn.login()) {
17 System.out.println("Login successful. Session: "+ircConn.getSession());
18 } else {
19 System.out.println("Login failed.");
20 }
21
22 }
23
24 }
Something went wrong with that request. Please try again.