From 51c45b5d42278644c4975c723fcb581e6c6af10a Mon Sep 17 00:00:00 2001 From: Johnny Xmas Date: Mon, 3 Aug 2026 00:14:28 -0500 Subject: [PATCH] Fix IRC SASL PLAIN using wrong credentials (NickServNick/Password) UseSASL wired girc.SASLPlain to NickServNick/NickServPassword, but those fields hold the NickServ *target* to message (defaults to "NickServ", e.g. QuakeNet's "Q@CServe.quakenet.org") for the non-SASL post-connect IDENTIFY path, not an account name. Any standard NickServ setup using SASL therefore authenticated as an account literally named "NickServ", failing with "Account does not exist" on ircds that don't have one (e.g. Ergo). Adds dedicated SASLLogin/SASLPassword config fields and wires SASL to those instead, falling back to Nick when SASLLogin is unset. Verified live against an Ergo ircd: SASL PLAIN now completes with 900/903 (logged in / authentication successful) using SASLLogin. --- bridge/config/config.go | 2 ++ bridge/irc/irc.go | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bridge/config/config.go b/bridge/config/config.go index b484970a37..d21790309a 100644 --- a/bridge/config/config.go +++ b/bridge/config/config.go @@ -157,6 +157,8 @@ type Protocol struct { SkipVersionCheck bool // mattermost StripNick bool // all protocols StripMarkdown bool // irc + SASLLogin string // IRC + SASLPassword string // IRC SyncTopic bool // slack TengoModifyMessage string // general Team string // mattermost, keybase diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go index 7202df5e5e..0ac34d62e3 100644 --- a/bridge/irc/irc.go +++ b/bridge/irc/irc.go @@ -86,9 +86,13 @@ func (b *Birc) Connect() error { } if b.GetBool("UseSASL") { + saslLogin := b.GetString("SASLLogin") + if saslLogin == "" { + saslLogin = b.GetString("Nick") + } i.Config.SASL = &girc.SASLPlain{ - User: b.GetString("NickServNick"), - Pass: b.GetString("NickServPassword"), + User: saslLogin, + Pass: b.GetString("SASLPassword"), } }