1
0
Fork 0
mirror of https://github.com/fluffle/goirc synced 2025-07-12 08:11:17 +00:00

Add SASL authentication support

This hacks together support for IRCv3.1 SASL. Currently only SASL PLAIN
is supported, but it's implemented in a way that adding support for
other types should not require too many changes to the current code.
This commit is contained in:
Taavi Väänänen 2022-10-30 12:01:33 +02:00 committed by Alex Bee
parent bbbcc9aa5b
commit e64b5d47c3
6 changed files with 234 additions and 23 deletions

View file

@ -10,6 +10,7 @@ const (
CONNECTED = "CONNECTED"
DISCONNECTED = "DISCONNECTED"
ACTION = "ACTION"
AUTHENTICATE = "AUTHENTICATE"
AWAY = "AWAY"
CAP = "CAP"
CTCP = "CTCP"
@ -322,3 +323,8 @@ func (conn *Conn) Cap(subcommmand string, capabilities ...string) {
}
}
}
// Authenticate send an AUTHENTICATE command to the server.
func (conn *Conn) Authenticate(message string) {
conn.Raw(AUTHENTICATE + " " + message)
}