mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
erc: use auth-source
* erc.el (erc-open): Use `auth-source' for password retrieval when possible.
This commit is contained in:
parent
a64a94eddd
commit
52f8337d71
2 changed files with 19 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2012-06-15 Julien Danjou <julien@danjou.info>
|
||||
|
||||
* erc.el (erc-open): Use `auth-source' for password retrieval when
|
||||
possible.
|
||||
|
||||
2012-06-12 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* erc-dcc.el (erc-dcc-chat-filter-functions): Rename from
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@
|
|||
(require 'font-lock)
|
||||
(require 'pp)
|
||||
(require 'thingatpt)
|
||||
(require 'auth-source)
|
||||
(require 'erc-compat)
|
||||
|
||||
(defvar erc-official-location
|
||||
|
|
@ -2006,7 +2007,19 @@ Returns the buffer for the given server or channel."
|
|||
;; The local copy of `erc-nick' - the list of nicks to choose
|
||||
(setq erc-default-nicks (if (consp erc-nick) erc-nick (list erc-nick)))
|
||||
;; password stuff
|
||||
(setq erc-session-password passwd)
|
||||
(setq erc-session-password (or passwd
|
||||
(let ((secret
|
||||
(plist-get
|
||||
(nth 0
|
||||
(auth-source-search :host server
|
||||
:max 1
|
||||
:user nick
|
||||
:port port
|
||||
:require '(:secret)))
|
||||
:secret)))
|
||||
(if (functionp secret)
|
||||
(funcall secret)
|
||||
secret))))
|
||||
;; debug output buffer
|
||||
(setq erc-dbuf
|
||||
(when erc-log-p
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue