29 lines
930 B
Kotlin
29 lines
930 B
Kotlin
package com.shr4pnel.ferretirc.net.messages
|
|
|
|
/**
|
|
* Representation of responses from the IRC server
|
|
*/
|
|
sealed class ServerMessage {
|
|
data class Cap(val placeholder: String? = null) : ServerMessage()
|
|
|
|
data class Pong(val token: String? = null) : ServerMessage()
|
|
|
|
data class Mode(val operatorName: String, val pMask: String) : ServerMessage()
|
|
|
|
data class PrivMsg(val targets: List<String>, val message: String) : ServerMessage()
|
|
|
|
data class Notice(val targets: List<String>, val message: String) : ServerMessage()
|
|
|
|
data class UNIMPLEMENTED(val msg: String) : ServerMessage()
|
|
|
|
sealed class Numeric(val number: Short) : ServerMessage() {
|
|
data class RPL_ISUPPORT(val keypairs: String) : Numeric(5)
|
|
|
|
class RPL_LISTSTART : Numeric(321)
|
|
|
|
data class RPL_LIST(val chanName: String, val clientCount: Int, val topic: String) : Numeric(322)
|
|
|
|
class RPL_LISTEND : Numeric(323)
|
|
}
|
|
}
|