erc layer: rename erc-use-sasl-auth to erc-enable-sasl-auth
This commit is contained in:
parent
18be7425f4
commit
42cce3a403
|
@ -23,7 +23,8 @@ Layer for [[http://www.emacswiki.org/emacs/ERC][ERC IRC chat]].
|
|||
- Social Graph for ERC messages (using [[https://github.com/vibhavp/erc-social-graph][erc-social-graph]])
|
||||
- ERC yank, if pasting more than 5 lines, create a gist for it. (needs to have
|
||||
=github= layer enabled, or using =gist= package)
|
||||
- Optional SASL authentication via the variable =erc-use-sasl-auth= (using [[http://emacswiki.org/emacs/ErcSASL][erc-sasl]])
|
||||
- Optional SASL authentication via the variable =erc-enable-sasl-auth=
|
||||
(using [[http://emacswiki.org/emacs/ErcSASL][erc-sasl]])
|
||||
|
||||
* Install
|
||||
|
||||
|
|
|
@ -1,2 +1,14 @@
|
|||
(defvar erc-use-sasl-auth nil
|
||||
"Use SASL authenthication with ERC")
|
||||
;;; config.el --- rcirc Layer configuration File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2014 Sylvain Benner
|
||||
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(defvar erc-enable-sasl-auth nil
|
||||
"If non nil then use SASL authenthication with ERC.")
|
||||
|
|
|
@ -7,33 +7,35 @@
|
|||
|
||||
(defun erc/init-erc-sasl ()
|
||||
(use-package erc-sasl
|
||||
:if erc-enable-sasl-auth
|
||||
;; Following http://www.emacswiki.org/emacs/ErcSASL
|
||||
;; Maybe an advice would be better?
|
||||
:config
|
||||
;; Add any server like this
|
||||
;; (add-to-list 'erc-sasl-server-regexp-list "host\\.server\\.com")
|
||||
(add-to-list 'erc-sasl-server-regexp-list "irc\\.freenode\\.net")
|
||||
(defun erc-login ()
|
||||
"Perform user authentication at the IRC server."
|
||||
(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))))
|
||||
(progn
|
||||
;; Add any server like this
|
||||
;; (add-to-list 'erc-sasl-server-regexp-list "host\\.server\\.com")
|
||||
(add-to-list 'erc-sasl-server-regexp-list "irc\\.freenode\\.net")
|
||||
(defun erc-login ()
|
||||
"Perform user authentication at the IRC server."
|
||||
(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)))))
|
||||
|
||||
(defun erc/init-erc-tex ()
|
||||
(require 'erc-tex))
|
||||
|
|
Loading…
Reference in New Issue