Hi people, I Cc'd Damien because a few of these questions involve auth-source-pass, and also Sam because they recently touched related areas in ERC. But anyone in the know, please don't hold back. Your input is welcome. In this bug set, I'm trying to make ERC smarter about how it integrates with auth-source. The current implementation suffers directly from the central problem this bug aims to address, namely, ERC's inability to understand the concept of logical (IRC) connections and how they relate to physical (TCP) connections. Strategies stemming from this improved awareness require a prioritizing of auth-source entries, not only when choosing query parameters but when filtering returned results. In particular, various compatibility crutches were required to make auth-source-pass produce output conforming to the shape and substance delivered by the netrc back end. The following patch set contains various unsightly machinations meant to force a more agreeable outcome (agreeable to ERC, that is). What I'm seeking from you (all) is confirmation that these patches don't suffer from any glaring misconceptions regarding the API. Note that I'm certainly *not* requesting any upstream changes, perhaps in part because ERC is tethered to the past (currently 27.2), so we'd have to wait an eternity before reaping any reward. Anyway, when you have a sec, please glance briefly at the following areas, all of them located in the first patch attached below: 1. The new option `erc-auth-source-parameters-function'. 2. The ERT tests residing in test/lisp/erc/erc-services-tests.el. Those should convey a feel for the behavior ERC is expecting. 3. The various business-related functions that touch the API in lisp/erc/erc.el. 4. The ugly adapters touching internal auth-source functions in lisp/erc/erc-compat.el. The reaction I'm hoping for is something along the lines of "I see what you're doing, and no, auth-source doesn't provide that OOTB, so knock yourself out" or, conversely, "lo, you're going about that all wrong, use this instead." Thanks, J.P. P.S. For additional context, the full patch series can be found at https://jpneverwas.gitlab.io/erc-tools/48598/patches.tar.gz and additional integrations involving SASL can be found in #49860.