Last active
January 2, 2016 16:29
-
-
Save tarchan/8330228 to your computer and use it in GitHub Desktop.
irc client idea
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
IRCClient bot = new IRCClient(config.json); | |
bot.addServer(name, host, port, nick, user, real, encoding, tls, rooms); | |
bot.addListener("join", new IRCListener() { | |
handle(IRCMessage msg) { | |
String line = msg.read(); | |
msg.send("hello!"); | |
} | |
}): | |
IRCNameManager nameManager = new IRCNameManager(); | |
nameManager.addListener(new IRCListener(){ | |
handle(String channel, String[] names) { | |
// channel = "#dameTunes" | |
// names = {"tarchan", "cafebot", ...} | |
} | |
}); | |
bot.addListener(nameManager); | |
bot.removeServer("name"); | |
bot.login("name"); | |
bot.loginAll(); | |
bot.quit("name"); | |
bot.quitAll(); | |
IRCConfig.from() | |
.setName("name") | |
.setHost("host") | |
.setPort(6667) | |
.setNick("nick") | |
.setPassword("password") | |
.setUser("user") | |
.setReal("Real Name") | |
.setEncoding("JIS") | |
.setTls(...) | |
.setRooms("#javabreak", #dameTunes", ...) | |
.setAutoJoin(true) | |
.asMap(); | |
IRCConfig.from("irc.properties").asMap(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.studyinghttp.net/range#RangeRequest