diff --git a/downstream.go b/downstream.go index f60dbc9..3524493 100644 --- a/downstream.go +++ b/downstream.go @@ -1110,6 +1110,15 @@ func (dc *downstreamConn) register(ctx context.Context) error { return fmt.Errorf("tried to register twice") } + if dc.saslServer != nil { + dc.saslServer = nil + dc.SendMessage(&irc.Message{ + Prefix: dc.srv.prefix(), + Command: irc.ERR_SASLABORTED, + Params: []string{"*", "SASL authentication aborted"}, + }) + } + password := dc.password dc.password = "" if dc.user == nil {