You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Chris Smith 9cc7b08ee3 Make state mutation funs internal пре 5 година
gradle/wrapper Upgrade to Gradle 5.1.1, fix new deprecations пре 5 година
src Make state mutation funs internal пре 5 година
.gitignore Make gradlew executable пре 5 година
.travis.yml Add task for building coverage, make travis report it пре 5 година
CHANGELOG Document IrcClient, make lots of things internal. пре 5 година
LICENCE Licence пре 5 година
README.md Add a couple of missing tests, coverage badge. пре 5 година
build.gradle.kts More documentation and tidying пре 5 година
gradlew Make gradlew executable пре 5 година
gradlew.bat Initial import, various supporting classes. пре 5 година

README.md

KtIrc

Build Status Codacy Badge codecov 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.