emacs-circe / circe

Circe, a Client for IRC in Emacs
GNU General Public License v3.0
390 stars 51 forks source link

after-cloak channel join fails on freenode #325

Open ghost opened 6 years ago

ghost commented 6 years ago

I've got following configuration (init.el) in GNU Emacs 25.3.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) with Circe version 2.6 (installed via package.el): '(circe-network-options (quote (("Freenode" :sasl-password mypassword :sasl-username myname :channels (:after-cloak "#freenode" "#emacs-circe") :nickserv-password mypassword :use-tls t :port 6697)))) '(circe-server-auto-join-default-type :after-cloak) The authentication works as expected, the cloak (@unaffiliated/myname) is applied properly (checked via nickserv status) but no channels are joined. If I join them manually it works fine.

Would be nice to get autojoin working as advertised.

ghost commented 6 years ago

Note: if you need cloak for testing, just request it directly from any stuff member on freenode - you can see currently available staff via /quote stats p command. Ask nicely via PM and you'll get one.

jorgenschaefer commented 6 years ago

Thank you for the report! Could you do M-: (setq irc-debug-log t) and see if cloaking sends a 396 response (that's RPL_HOSTHIDDEN)? If not, what's the server message to notify you of a cloak being applied?

ghost commented 6 years ago

Sure, where can I find the debug log?

jorgenschaefer commented 6 years ago

It's in a buffer called *IRC Protocol ...* :-)

ghost commented 6 years ago

Indeed, no such message at all, below is my log sample.

E: "conn.connected" 
C: CAP LS
C: NICK mynick
C: USER myuser 8 * Myname
S: :sinisalo.freenode.net NOTICE * :*** Looking up your hostname...
E: "NOTICE" "sinisalo.freenode.net" "*" "*** Looking up your hostname..."
E: "irc.notice" "sinisalo.freenode.net" "*" "*** Looking up your hostname..."
S: :sinisalo.freenode.net NOTICE * :*** Checking Ident
E: "NOTICE" "sinisalo.freenode.net" "*" "*** Checking Ident"
E: "irc.notice" "sinisalo.freenode.net" "*" "*** Checking Ident"
S: :sinisalo.freenode.net NOTICE * :*** Found your hostname
E: "NOTICE" "sinisalo.freenode.net" "*" "*** Found your hostname"
E: "irc.notice" "sinisalo.freenode.net" "*" "*** Found your hostname"
S: :sinisalo.freenode.net NOTICE * :*** No Ident response
E: "NOTICE" "sinisalo.freenode.net" "*" "*** No Ident response"
E: "irc.notice" "sinisalo.freenode.net" "*" "*** No Ident response"
S: :sinisalo.freenode.net CAP * LS :account-notify extended-join identify-msg multi-prefix sasl
E: "CAP" "sinisalo.freenode.net" "*" "LS" "account-notify extended-join identify-msg multi-prefix sasl"
C: CAP REQ :sasl extended-join
S: :sinisalo.freenode.net CAP mynick ACK :sasl extended-join 
E: "CAP" "sinisalo.freenode.net" "mynick" "ACK" "sasl extended-join "
C: AUTHENTICATE PLAIN
S: AUTHENTICATE +
E: "AUTHENTICATE" nil "+"
C: AUTHENTICATE blahblahhexblah
S: :sinisalo.freenode.net 900 mynick mynick!myuser@unaffiliated/mynick mynick :You are now logged in as mynick.
E: "900" "sinisalo.freenode.net" "mynick" "mynick!myuser@unaffiliated/mynick" "mynick" "You are now logged in as mynick."
E: "sasl.login" "mynick!myuser@unaffiliated/mynick" "mynick"
S: :sinisalo.freenode.net 903 mynick :SASL authentication successful
E: "903" "sinisalo.freenode.net" "mynick" "SASL authentication successful"
C: CAP END
S: :sinisalo.freenode.net 001 mynick :Welcome to the freenode Internet Relay Chat Network mynick
E: "001" "sinisalo.freenode.net" "mynick" "Welcome to the freenode Internet Relay Chat Network mynick"
E: "irc.registered" "mynick"
S: :sinisalo.freenode.net 002 mynick :Your host is sinisalo.freenode.net[91.217.189.42/6697], running version ircd-seven-1.1.5
E: "002" "sinisalo.freenode.net" "mynick" "Your host is sinisalo.freenode.net[91.217.189.42/6697], running version ircd-seven-1.1.5"
S: :sinisalo.freenode.net 003 mynick :This server was created Fri Jan 12 2018 at 18:45:07 UTC

Could it be due to use of SASL auth?

jorgenschaefer commented 6 years ago

I think when you use SASL, Freenode automatically applies cloaking without any particular handshake, so Circe does not know it's cloaking. You can use the after-auth hook then.

ghost commented 6 years ago

Cool, I think it's worth it to document this on a wiki: the event name, enabling debug log, recommended setting for sasl auth etc.

jorgenschaefer commented 6 years ago

Sounds like an idea. It's always a bit tricky on whether to document idiosyncrasies of a single IRC network with a generic IRC client, but considering Freenode is like 90% of IRC these days, I guess that makes sense. :-)