Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package com.dmdirc.ktirc.events
  2. import com.dmdirc.ktirc.model.Capability
  3. import com.dmdirc.ktirc.model.ServerFeatureMap
  4. import com.dmdirc.ktirc.model.User
  5. import java.time.LocalDateTime
  6. /** Base class for all events. */
  7. sealed class IrcEvent(val time: LocalDateTime)
  8. /** Raised when the server initially welcomes us to the IRC network. */
  9. class ServerWelcome(time: LocalDateTime, val localNick: String) : IrcEvent(time)
  10. /** Raised when the features supported by the server have changed. This may occur numerous times. */
  11. class ServerFeaturesUpdated(time: LocalDateTime, val serverFeatures: ServerFeatureMap) : IrcEvent(time)
  12. /** Raised when the connection to the server has been established, configuration information has been received, etc. */
  13. // TODO: Implement
  14. class ServerConnected(time: LocalDateTime) : IrcEvent(time)
  15. /** Raised whenever a PING is received from the server. */
  16. class PingReceived(time: LocalDateTime, val nonce: ByteArray) : IrcEvent(time)
  17. /** Raised when a user joins a channel. */
  18. class ChannelJoined(time: LocalDateTime, val user: User, val channel: String) : IrcEvent(time)
  19. /** Raised when a user leaves a channel. */
  20. class ChannelParted(time: LocalDateTime, val user: User, val channel: String, val reason: String = "") : IrcEvent(time)
  21. /** Raised when a batch of the channel's member list has been received. More batches may follow. */
  22. class ChannelNamesReceived(time: LocalDateTime, val channel: String, val names: List<String>) : IrcEvent(time)
  23. /** Raised when the entirety of the channel's member list has been received. */
  24. class ChannelNamesFinished(time: LocalDateTime, val channel: String) : IrcEvent(time)
  25. /** Raised when a message is received. */
  26. class MessageReceived(time: LocalDateTime, val user: User, val target: String, val message: String) : IrcEvent(time)
  27. /** Raised when a user quits. */
  28. class UserQuit(time: LocalDateTime, val user: User, val reason: String = "") : IrcEvent(time)
  29. /** Raised when available server capabilities are received. More batches may follow. */
  30. class ServerCapabilitiesReceived(time: LocalDateTime, val capabilities: Map<Capability, String>) : IrcEvent(time)
  31. /** Raised when our requested capabilities are acknowledged. More batches may follow. */
  32. class ServerCapabilitiesAcknowledged(time: LocalDateTime, val capabilities: Map<Capability, String>) : IrcEvent(time)
  33. /** Raised when the server has finished sending us capabilities. */
  34. class ServerCapabilitiesFinished(time: LocalDateTime) : IrcEvent(time)