Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 1.84 KB

README.md

File metadata and controls

58 lines (44 loc) · 1.84 KB

Kitteh IRC Client Library

The Kitteh IRC Client Library (KICL) is a powerful, modern Java IRC library built with NIO using the Netty library to maximize performance and scalability.

Coverage Powered by Kittens

Minimal example

import net.engio.mbassy.listener.Handler;

import org.kitteh.irc.client.library.Client;
import org.kitteh.irc.client.library.event.channel.ChannelJoinEvent;

public class Example {
    public static class Listener {
        @Handler
        public void onUserJoinChannel(ChannelJoinEvent event) {
            if (event.getClient().isUser(event.getUser())) { // It's me!
                event.getChannel().sendMessage("Hello world! Kitteh's here for cuddles.");
                return;
            }
            // It's not me!
            event.getChannel().sendMessage("Welcome, " + event.getUser().getNick() + "! :3");
        }
    }

    public static void main(String[] args) {
        Client client = Client.builder().nick("Kitteh").server().host("127.0.0.1").then().buildAndConnect();
        client.getEventManager().registerEventListener(new Listener());
        client.addChannel("#kicl");
    }
}

Adding the dependency

<dependency>
    <groupId>org.kitteh.irc</groupId>
    <artifactId>client-lib</artifactId>
    <version>9.0.0</version>
</dependency>
implementation "org.kitteh.irc:client-lib:9.0.0"

Releases are available on Maven Central.

Logo?

KICL HAS A BAD LOGO