選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Events.kt 969B

12345678910111213141516171819202122232425262728293031323334
  1. @file:Suppress("ArrayInDataClass")
  2. package com.dmdirc.ktirc.events
  3. import com.dmdirc.ktirc.model.ServerFeatureMap
  4. import com.dmdirc.ktirc.model.User
  5. sealed class IrcEvent
  6. /**
  7. * Raised when the server initially welcomes us to the IRC network.
  8. */
  9. data class ServerWelcome(val localNick: String): IrcEvent()
  10. /**
  11. * Raised when the features supported by the server have changed. This may occur numerous times during the
  12. * connection phase.
  13. */
  14. data class ServerFeaturesUpdated(val serverFeatures: ServerFeatureMap) : IrcEvent()
  15. /**
  16. * Raised when the connection to the server has been established, configuration information has been received, etc.
  17. */
  18. object ServerConnected : IrcEvent()
  19. /**
  20. * Raised whenever a PING is received from the server.
  21. */
  22. data class PingReceived(val nonce: ByteArray): IrcEvent()
  23. /**
  24. * Raised when a user joins a channel.
  25. */
  26. data class ChannelJoined(val user: User, val channel: String): IrcEvent()