You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MessageProcessor.kt 850B

123456789101112131415161718192021222324252627282930313233343536
  1. package com.dmdirc.ktirc.messages
  2. import com.dmdirc.ktirc.events.IrcEvent
  3. import com.dmdirc.ktirc.model.IrcMessage
  4. internal interface MessageProcessor {
  5. /**
  6. * The messages which this handler can process.
  7. */
  8. val commands: Array<String>
  9. /**
  10. * Processes the given message.
  11. */
  12. fun process(message: IrcMessage): List<IrcEvent>
  13. }
  14. internal val messageProcessors = setOf(
  15. AccountProcessor(),
  16. AuthenticationProcessor(),
  17. CapabilityProcessor(),
  18. ISupportProcessor(),
  19. JoinProcessor(),
  20. KickProcessor(),
  21. ModeProcessor(),
  22. MotdProcessor(),
  23. NamesProcessor(),
  24. NoticeProcessor(),
  25. PartProcessor(),
  26. PingProcessor(),
  27. PrivmsgProcessor(),
  28. QuitProcessor(),
  29. WelcomeProcessor()
  30. )