All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lt.saltyjuice.dragas.chatty.v3.irc.route.IrcRoute.kt Maven / Gradle / Ivy

package lt.saltyjuice.dragas.chatty.v3.irc.route

import lt.saltyjuice.dragas.chatty.v3.core.route.Route
import lt.saltyjuice.dragas.chatty.v3.irc.message.Request
import lt.saltyjuice.dragas.chatty.v3.irc.message.Response


/**
 * An IRC implementation of [Route] objects.
 *
 * By default, they only test if provided type matches the request type, as well as if it
 * passes provided test callback and middleware tests.
 */
abstract class IrcRoute : Route()
{
    protected open var type: String = ""

    override fun canTrigger(request: Request): Boolean
    {
        return request.command == type && super.canTrigger(request)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy