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.

Plain.kt 515B

1234567891011121314151617
  1. package com.dmdirc.ktirc.sasl
  2. import com.dmdirc.ktirc.IrcClient
  3. import com.dmdirc.ktirc.messages.sendAuthenticationMessage
  4. internal class PlainMechanism : SaslMechanism {
  5. override val ircName = "PLAIN"
  6. override val priority = 0
  7. override fun handleAuthenticationEvent(client: IrcClient, data: ByteArray?) {
  8. with (client.profile) {
  9. client.sendAuthenticationMessage("$authUsername\u0000$authUsername\u0000$authPassword".toByteArray().toBase64())
  10. }
  11. }
  12. }