WolfIRC for java is a java irc client library for making bots and clients
this project uses yystal lib (https://github.com/united-meows/yystal)
WolfIRC client = new WolfIRC("WolfIRCBot", "WolfIRC Bot"); /* nick, description */
client.connect("irc.freenode.net", 6667); /* irc server info */
client.joinChannel("#wolfirc"); /* you can join more than 1 channel at any time */
wolfIrc.useSendQueue(); /* (optional) queues the actions with a delay for ratelimiting */
client.onChannelMessage.bind(new WOnChannelMessage() {
@Override
public void onChannelMessage(IRCChannel channel, IRCUser sender, String message) {
System.out.println("channel message received");
}
});
onRawDataEvent (tcp client raw data)
onMotdEndEvent (gets called when server done sending the motd)
onUserQuitEvent (gets called when someone leaves the channel)
onPingEvent (gets called when server sends ping/pong)
onUserNickChangeEvent (gets called when someone in same room as you changes their nick)
onChannelJoinEvent (gets called when you join a room)
onUserJoinChannelEvent (gets called when someone joines the channel that you in)
// IRCChannel
channel.users(); /* returns list of users that connected on the channel */
channel.leave(client); /* leaves the channel */
channel.sendMessage(client, message); /* you can use client.sendMessage too */
//IRCUser
user.isOp(); /* returns if the user is operator */
user.userName(); /* returns user's username */
// WolfIRC
client.setMode(String) /* sets the mode (like +x) */
client.leaveChannel(String) /* leaves the channel */
client.sendPM(String user, String message) /* sends pm */
client.register(String password, String email) /* tries to register the server (!! Deprecated use sendRaw instead) */
client.close(); /* closes the client */
client.changeUsername(String) /* change nick */
client.joinedRooms /* map of channels you have joined */