toString override for ClientMessage
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user