3

I would like to exchange on Freenode using ERC, however I do not know how to authenticate with SASL as required.

-xxxxxx.freenode.net- *** Lookup up your hostname...
-xxxxxx.freenode.net- *** Checking Ident
-xxxxxx.freenode.net- *** Found your hostname
-xxxxxx.freenode.net- *** No Ident response
-xxxxxx.freenode.net- *** Notice -- You need to identify via SASL to use
            this server

==> ERROR from irc.freenode.net: Closing Link:
xxxxxxxxxxxxxxxxxxxx.xx     (SASL access only)

Connection failed!  Not re-establishing connection.

*** ERC terminated: connection broken by remote peer

I looked quickly the ERC manual and the EmacsWiki website. I also noticed that Emacs has a SASL library. Moreover, a developer was proposing a SASL extension for ERC on a GitHub repository.

I am looking for a solution as well as an explanation (or overview) to facilitate a possible inspection of the source code. Eventually, you can specify how to proceed for other IRC clients (rcirc,...).

1

I ended up patching the erc-login function to use the SASL extension. I first installed this package https://github.com/joseph-gay/erc-sasl and added this to my init file:

(require 'erc-sasl)
(add-to-list 'erc-sasl-server-regexp-list "irc\\.freenode\\.net")

(defun erc-login ()
  "Perform user authentication at the IRC server. (PATCHED)"
  (erc-log (format "login: nick: %s, user: %s %s %s :%s"
           (erc-current-nick)
           (user-login-name)
           (or erc-system-name (system-name))
           erc-session-server
           erc-session-user-full-name))
  (if erc-session-password
      (erc-server-send (format "PASS %s" erc-session-password))
    (message "Logging in without password"))
  (when (and (featurep 'erc-sasl) (erc-sasl-use-sasl-p))
    (erc-server-send "CAP REQ :sasl"))
  (erc-server-send (format "NICK %s" (erc-current-nick)))
  (erc-server-send
   (format "USER %s %s %s :%s"
       ;; hacked - S.B.
       (if erc-anonymous-login erc-email-userid (user-login-name))
       "0" "*"
       erc-session-user-full-name))
  (erc-update-mode-line))
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy