選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
Chris Smith 25e6e40855 README 5年前
gradle/wrapper Upgrade to Gradle 5.1.1, fix new deprecations 5年前
src README 5年前
.gitignore Make gradlew executable 5年前
CHANGELOG Rework coroutines to make more sense. 5年前
LICENCE Licence 5年前
README.md README 5年前
build.gradle.kts Upgrade to Gradle 5.1.1, fix new deprecations 5年前
gradlew Make gradlew executable 5年前
gradlew.bat Initial import, various supporting classes. 5年前

README.md

KtIrc

Download

KtIrc is a Kotlin JVM library for connecting to and interacting with IRC servers. It is still in an early stage of development.

Setup

KtIrc is published to JCenter, so adding it to a gradle build is as simple as:

repositories {
    jcenter()
}

dependencies {
    implementation("com.dmdirc:ktirc:<VERSION>")
}

Usage

The main interface for interacting with KtIrc is the IrcClientImpl class. A simple bot might look like:

val client = IrcClientImpl(Server("my.server.com", 6667), Profile("nick", "realName", "userName"))
client.onEvent { event ->
    when (event) {
        is ServerWelcome ->
            client.send(joinMessage("#ktirc"))
        is MessageReceived ->
            if (event.message == "!test")
                client.send(privmsgMessage(event.target, "Test successful!"))
    }
}
client.connect()

Contributing

Contributing is welcomed and encouraged! Please try to add unit tests for new features, and maintain a code style consistent with the existing code.

Licence

The code in this repository is released under the MIT licence. See the LICENCE file for more info.