toString override for ClientMessage

This commit is contained in:
2026-09-15 03:08:04 +01:00
parent 7c65309d99
commit cc0719a061
@@ -19,6 +19,8 @@ sealed class ClientMessage(val strName: String) {
}
}
override fun toString() = "$strName[params=$params trailing=:$trailing]"
class Ping(val token: String? = null) : ClientMessage("PING") {
init {
require(token?.isNotEmpty() ?: true) {
@@ -97,12 +99,13 @@ sealed class ClientMessage(val strName: String) {
get() = listOf(channel.chanName)
}
// TODO RPL_ISUPPORT REQUIREMENTS IN FUN EG LINELEN STATUSMSG - ALSO ADD FUCKING STUPID STATUSMSG & SUPPORT FOR MASKS. FUCK ME
class PrivMsg(val target: IRCChannel, val message: String) : ClientMessage("PRIVMSG") {
override val params: kotlin.collections.List<String>
get() =
listOf(
target.chanName,
) // TODO RPL_ISUPPORT REQUIREMENTS IN FUN EG LINELEN STATUSMSG - ALSO ADD FUCKING STUPID STATUSMSG & SUPPORT FOR MASKS. FUCK ME
)
override val trailing: String
get() = message