From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Steve Scott Newsgroups: gmane.emacs.bugs Subject: bug#10162: [PATCH] 24.0.91; rcirc autojoin broken (freenode/oftc) when rcirc-authenticate-before-join is set Date: Mon, 03 Jun 2019 19:54:16 -0300 Message-ID: <87ef4a9t5z.fsf@stevescott.ca> References: <87ipm2o2m7.fsf@gmail.com> <875zpn5vy1.fsf@stevescott.ca> <87y32i48ny.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="152335"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 10162@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 04 00:57:21 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hXvtI-000dUh-81 for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Jun 2019 00:57:20 +0200 Original-Received: from localhost ([127.0.0.1]:42031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXvtG-0006z2-SN for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Jun 2019 18:57:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXvtA-0006yx-1n for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2019 18:57:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hXvt5-0006Qc-9U for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2019 18:57:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58058) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hXvsz-0006LV-V0 for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2019 18:57:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hXvsz-0005T2-Ob for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2019 18:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Steve Scott Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Jun 2019 22:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10162 X-GNU-PR-Package: emacs Original-Received: via spool by 10162-submit@debbugs.gnu.org id=B10162.155960258620973 (code B ref 10162); Mon, 03 Jun 2019 22:57:01 +0000 Original-Received: (at 10162) by debbugs.gnu.org; 3 Jun 2019 22:56:26 +0000 Original-Received: from localhost ([127.0.0.1]:43369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hXvsP-0005SC-Pb for submit@debbugs.gnu.org; Mon, 03 Jun 2019 18:56:26 -0400 Original-Received: from 23.ip-144-217-85.net ([144.217.85.23]:55694 helo=mailserv.stevescott.ca) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hXvqS-0005P2-2p for 10162@debbugs.gnu.org; Mon, 03 Jun 2019 18:54:24 -0400 Original-Received: from localhost (mailserv.stevescott.ca [127.0.0.1]) by mailserv.stevescott.ca (Postfix) with ESMTP id 704C13EA4B; Mon, 3 Jun 2019 19:54:18 -0300 (ADT) X-Virus-Scanned: Debian amavisd-new at mailserv.stevescott.ca Original-Received: from mailserv.stevescott.ca ([127.0.0.1]) by localhost (mailserv.stevescott.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UUvC0Oc4-yOD; Mon, 3 Jun 2019 19:54:17 -0300 (ADT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=stevescott.ca; s=dkim; t=1559602457; bh=XOfz1Tc/Xki9wWsjs/sDt66Ig7I9VO46XGYGNHC0PgQ=; h=References:From:To:Cc:Subject:In-reply-to:Date:From; b=UrWFr5mB5bvfqK7LfziASKjF/4E7Q73nTJAT3cy2MDguLLKw7myQ2bB20A/B3+UnB EpdnY6jwm2TTUSx0TrBPap5GThXS28UyyqnXOQ1HGvqBJQL7PRx4rkpdj5zNZE7oHI peYkAeeO0urmIGK3ntFzD7eGtVGYyYmPk2AGqQiI= In-reply-to: <87y32i48ny.fsf@gmail.com> X-Mailman-Approved-At: Mon, 03 Jun 2019 18:56:24 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:160090 Archived-At: There are three cases, and authenticate needs to be called for two of them: 1) auto-authenticate + authenticate-before-join Use the hook to ensure authentication completes before joining. 2) auto-authenticate but not "before join" In this case, authenticate must still be called but the hook is not required because the order is not important. 3) no auto-authenticate Just join the channels without authenticating. The "Otherwise" comment refers to the 3rd case: if auto-authenticate is set but no authinfo is specified we just join the channels. I'm not sure authenticate-before-join is even necessary. I would recommend authenticating before joining be the way it works but that's probably a separate discussion. Noam Postavsky writes: > Steve Scott writes: > >> Since the hostname returned by irc.freenode.net can be something other >> than irc.freenode.net, e.g. niven.freenode.net, the entries for >> rcirc-authinfo and rcirc-server-alist will not match. > > Thanks, I was hitting this, and based on your explanation, I changed my > rcirc-authinfo entry to "[.]freenode[.]net\\'" instead of > "irc.freenode.net" and autojoin started working. > >> + (if (and rcirc-auto-authenticate-flag >> + ;; We have to ensure that there's an authentication >> + ;; entry for that server. Otherwise, >> + ;; there's no point in calling authenticate. >> + (let (auth-required) >> + (dolist (s rcirc-authinfo auth-required) >> + (when (string-match (car s) rcirc-server) >> + (setq auth-required t))))) >> + (if rcirc-authenticate-before-join > > But it looks like we're still calling authenticate, even in the > "otherwise" case, even though you say there's no point?