Simply doesn't work! #1

Closed
denizdogan opened this Issue Apr 1, 2012 · 11 comments

Comments

Projects
None yet
2 participants
@denizdogan

I'm trying to use erc-sasl for Freenode here, but I'm not sure what I'm doing wrong. This is basically my entire setup:

(eval-after-load "erc"
'(progn
(require 'erc-sasl)
(add-to-list 'erc-sasl-server-regexp-list ".freenode.com'")))

The error I get when connecting is the same as without erc-sasl:

[14:48] -holmes.freenode.net- *** Notice -- You need to identify via SASL to use this server
[14:48] ==> ERROR from irc.freenode.net: Closing Link: c-178-73-204-222.anonymous.at.anonine.com (SASL access only)

What am I doing wrong?

@jane-lx

This comment has been minimized.

Show comment Hide comment
@jane-lx

jane-lx Apr 1, 2012

Owner

Hi. Did you provide a password when connecting?

Owner

jane-lx commented Apr 1, 2012

Hi. Did you provide a password when connecting?

@jane-lx

This comment has been minimized.

Show comment Hide comment
@jane-lx

jane-lx Apr 1, 2012

Owner

Oh, a more likely problem, your regex won't match. You are connecting to irc.freenode.net, not freenode.com. Also, you need to escape backslashes for elisp string regexes.

Try something like:

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

jane-lx commented Apr 1, 2012

Oh, a more likely problem, your regex won't match. You are connecting to irc.freenode.net, not freenode.com. Also, you need to escape backslashes for elisp string regexes.

Try something like:

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

This comment has been minimized.

Show comment Hide comment
@denizdogan

denizdogan Apr 2, 2012

I've tried both with and without a password, using the following code:

(eval-after-load "erc"
  '(progn
     (require 'erc-sasl)
     (add-to-list 'erc-sasl-server-regexp-list "\\.freenode\\.net\\'")))

I get no errors about any password or anything that indicates that erc-sasl.el is being used.

I've tried both with and without a password, using the following code:

(eval-after-load "erc"
  '(progn
     (require 'erc-sasl)
     (add-to-list 'erc-sasl-server-regexp-list "\\.freenode\\.net\\'")))

I get no errors about any password or anything that indicates that erc-sasl.el is being used.

@jane-lx

This comment has been minimized.

Show comment Hide comment
@jane-lx

jane-lx Apr 2, 2012

Owner

Why is there a single quote at the end of your regex? Could you try without that?

Owner

jane-lx commented Apr 2, 2012

Why is there a single quote at the end of your regex? Could you try without that?

@denizdogan

This comment has been minimized.

Show comment Hide comment
@denizdogan

denizdogan Apr 2, 2012

It is an expression denoting "end of string". Removing it didn't help. :(

It is an expression denoting "end of string". Removing it didn't help. :(

@jane-lx

This comment has been minimized.

Show comment Hide comment
@jane-lx

jane-lx Apr 2, 2012

Owner

There is a requirement I suppose I should be clear about. You must have a nick registered and verified at freenode. When you initiate the erc connection, you must provide up front your registered nick and associated password.

For example, if you connect using the function erc, or the function erc-tls, you must either provide values for both the :nick and :password, or you must have previously set the variables erc-nick and erc-password to the appropriate values. Otherwise, erc-sasl cannot work, because it cannot send the identifying information to the server.

If that is the case, and if you use a regular expression that will match, .e.g. "\.freenode\.net" (note this is different from what you posted above), then erc-sasl should work, provided you are using the modified version of erc.el found in this repository.

Owner

jane-lx commented Apr 2, 2012

There is a requirement I suppose I should be clear about. You must have a nick registered and verified at freenode. When you initiate the erc connection, you must provide up front your registered nick and associated password.

For example, if you connect using the function erc, or the function erc-tls, you must either provide values for both the :nick and :password, or you must have previously set the variables erc-nick and erc-password to the appropriate values. Otherwise, erc-sasl cannot work, because it cannot send the identifying information to the server.

If that is the case, and if you use a regular expression that will match, .e.g. "\.freenode\.net" (note this is different from what you posted above), then erc-sasl should work, provided you are using the modified version of erc.el found in this repository.

@denizdogan

This comment has been minimized.

Show comment Hide comment
@denizdogan

denizdogan Apr 2, 2012

Oh, well, I guess we found the problem. I'm not using a modified version of erc.el! Is there any particular reason why ERC can't be extended without modifying erc.el?

Oh, well, I guess we found the problem. I'm not using a modified version of erc.el! Is there any particular reason why ERC can't be extended without modifying erc.el?

@jane-lx

This comment has been minimized.

Show comment Hide comment
@jane-lx

jane-lx Apr 2, 2012

Owner

Also, to your point above about there not being an error message, erc-sasl should print an error message to the erc window if it is activated with a nil erc-session-password. This leads me to believe that the regex is still not matching, in which case erc-sasl will simply not be active.

Owner

jane-lx commented Apr 2, 2012

Also, to your point above about there not being an error message, erc-sasl should print an error message to the erc window if it is activated with a nil erc-session-password. This leads me to believe that the regex is still not matching, in which case erc-sasl will simply not be active.

@denizdogan

This comment has been minimized.

Show comment Hide comment
@denizdogan

denizdogan Apr 2, 2012

I assure you that the regular expression is fine.

`\''
     matches the empty string, but only at the end of the buffer or
     string being matched against.

I assure you that the regular expression is fine.

`\''
     matches the empty string, but only at the end of the buffer or
     string being matched against.
@jane-lx

This comment has been minimized.

Show comment Hide comment
@jane-lx

jane-lx Apr 2, 2012

Owner

You are correct about the regex. I apologize for my ignorance. erc-sasl is still working for me to connect to freenode. I have verified that I still cannot connect without it, in which case I receive the same message as you reported, "You need to identify via SASL to use this server."

Here is something else to try: set erc-debug-irc-protocol to t, and the paste the output shown under the erc-protocol buffer, with the encoded passphrase elided.

Owner

jane-lx commented Apr 2, 2012

You are correct about the regex. I apologize for my ignorance. erc-sasl is still working for me to connect to freenode. I have verified that I still cannot connect without it, in which case I receive the same message as you reported, "You need to identify via SASL to use this server."

Here is something else to try: set erc-debug-irc-protocol to t, and the paste the output shown under the erc-protocol buffer, with the encoded passphrase elided.

@jane-lx

This comment has been minimized.

Show comment Hide comment
@jane-lx

jane-lx Apr 2, 2012

Owner

Sorry, I just noticed your comment above. I asked the erc devs about that. The issue is that there is no hook early enough into the login process. The capability request for SASL has to be one of the first things to happen. The necessary modification is only two lines. If you are tracking erc development, you could just make your own local branch with those two lines in place. If not, you can re defun erc-login somewhere in your init process with the necessary changes.

Update:
I intend to have the changes incorporated into Emacs, and I have already made such a request. It has been accepted by the erc devs, but needs to get into Emacs proper. They were on feature freeze at last check, but I should probably revisit.

Owner

jane-lx commented Apr 2, 2012

Sorry, I just noticed your comment above. I asked the erc devs about that. The issue is that there is no hook early enough into the login process. The capability request for SASL has to be one of the first things to happen. The necessary modification is only two lines. If you are tracking erc development, you could just make your own local branch with those two lines in place. If not, you can re defun erc-login somewhere in your init process with the necessary changes.

Update:
I intend to have the changes incorporated into Emacs, and I have already made such a request. It has been accepted by the erc devs, but needs to get into Emacs proper. They were on feature freeze at last check, but I should probably revisit.

@jane-lx jane-lx closed this Apr 18, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment