Apply Ktlint styling
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package com.shr4pnel.ferretirc.net
|
||||
|
||||
import com.shr4pnel.ferretirc.util.Helpers
|
||||
import com.shr4pnel.ferretirc.net.messages.ServerMessage
|
||||
import com.shr4pnel.ferretirc.util.Helpers
|
||||
import io.github.oshai.kotlinlogging.KotlinLogging
|
||||
import io.github.oshai.kotlinlogging.slf4j.logger
|
||||
import kotlinx.coroutines.channels.Channel
|
||||
@@ -39,11 +39,13 @@ class MessageParser(val incoming: Channel<String>) {
|
||||
override fun toServerMessage() =
|
||||
when (command.uppercase()) {
|
||||
"PONG" -> ServerMessage.Pong(getTrailingParameterString().removePrefix(":"))
|
||||
|
||||
// TODO MODE, CHANMODE, LOCALMODE
|
||||
"MODE" ->
|
||||
ServerMessage.Mode(
|
||||
parameters.first(),
|
||||
parameters.last().removePrefix(":"),
|
||||
) // TODO MODE, CHANMODE, LOCALMODE
|
||||
)
|
||||
|
||||
"NOTICE" ->
|
||||
ServerMessage.Notice(
|
||||
@@ -57,9 +59,7 @@ class MessageParser(val incoming: Channel<String>) {
|
||||
getTrailingParameterString(),
|
||||
)
|
||||
|
||||
else -> {
|
||||
ServerMessage.UNIMPLEMENTED("$command ${parameters.joinToString(" ")}")
|
||||
}
|
||||
else -> ServerMessage.UNIMPLEMENTED("$command ${parameters.joinToString(" ")}")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.shr4pnel.ferretirc.net
|
||||
|
||||
import com.shr4pnel.ferretirc.util.Helpers
|
||||
import com.shr4pnel.ferretirc.net.messages.MessageIO
|
||||
import com.shr4pnel.ferretirc.net.messages.ServerMessage
|
||||
import com.shr4pnel.ferretirc.util.Helpers
|
||||
import io.github.oshai.kotlinlogging.KotlinLogging
|
||||
import io.github.oshai.kotlinlogging.slf4j.logger
|
||||
import io.ktor.network.sockets.Socket
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.shr4pnel.ferretirc.net
|
||||
|
||||
import com.shr4pnel.ferretirc.util.Helpers
|
||||
import com.shr4pnel.ferretirc.net.messages.MessageIO
|
||||
import com.shr4pnel.ferretirc.util.Helpers
|
||||
import io.github.oshai.kotlinlogging.KotlinLogging
|
||||
import io.github.oshai.kotlinlogging.slf4j.logger
|
||||
import io.ktor.network.sockets.Socket
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package com.shr4pnel.ferretirc.net.messages
|
||||
|
||||
import java.lang.annotation.ElementType
|
||||
import java.lang.annotation.Inherited
|
||||
|
||||
/**
|
||||
* Representation of responses from the IRC server
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user