Chris Smith 812ec4990b Better server state handling | 5 lat temu | |
---|---|---|
gradle/wrapper | 5 lat temu | |
src | 5 lat temu | |
.gitignore | 5 lat temu | |
.travis.yml | 5 lat temu | |
CHANGELOG | 5 lat temu | |
LICENCE | 5 lat temu | |
README.md | 5 lat temu | |
build.gradle.kts | 5 lat temu | |
gradlew | 5 lat temu | |
gradlew.bat | 5 lat temu |
KtIrc is a Kotlin JVM library for connecting to and interacting with IRC servers. It is still in an early stage of development.
KtIrc is published to JCenter, so adding it to a gradle build is as simple as:
repositories {
jcenter()
}
dependencies {
implementation("com.dmdirc:ktirc:<VERSION>")
}
The main interface for interacting with KtIrc is the IrcClientImpl
class. A
simple bot might look like:
with(IrcClientImpl(Server("my.server.com", 6667), Profile("nick", "realName", "userName"))) {
onEvent { event ->
when (event) {
is ServerWelcome -> sendJoin("#ktirc")
is MessageReceived ->
if (event.message == "!test")
reply(event, "Test successful!")
}
}
connect()
}
Contributing is welcomed and encouraged! Please try to add unit tests for new features, and maintain a code style consistent with the existing code.
The code in this repository is released under the MIT licence. See the LICENCE file for more info.