diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 3bd9ff3..458892a 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -222,6 +222,11 @@ prompt you for it.") :group 'erc :type 'boolean) +(defcustom erc-use-ssl nil + "If set to non-nill, use SSL to connect to all networks." + :group 'erc + :type 'boolean) + (defcustom erc-hide-prompt nil "If non-nil, do not display the prompt for commands. @@ -2145,10 +2150,10 @@ functions in here get called with the parameters SERVER and NICK." ;;;###autoload (cl-defun erc (&key (server (erc-compute-server)) - (port (erc-compute-port)) - (nick (erc-compute-nick)) - password - (full-name (erc-compute-full-name))) + (port (erc-compute-port)) + (nick (erc-compute-nick)) + password + (full-name (erc-compute-full-name))) "ERC is a powerful, modular, and extensible IRC client. This function is the main entry point for ERC. @@ -2169,7 +2174,9 @@ then the server and full-name will be set to those values, whereas `erc-compute-port', `erc-compute-nick' and `erc-compute-full-name' will be invoked for the values of the other parameters." (interactive (erc-select-read-args)) - (erc-open server port nick full-name t password)) + (let ((erc-server-connect-function (if erc-use-ssl 'erc-open-tls-stream + 'erc-server-connect-function))) + (erc-open server port nick full-name t password))) ;;;###autoload (defalias 'erc-select 'erc)