diff options
author | Deniz Dogan <[email protected]> | 2011-06-05 21:03:28 +0200 |
---|---|---|
committer | Deniz Dogan <[email protected]> | 2011-06-05 21:03:28 +0200 |
commit | ac09b8a1289ec8f8a71c8dc55d4eeebaf2600707 (patch) | |
tree | 784a0cb99eb1d82e5984762991cbba169e32d2ad | |
parent | 34699b85fd84223412b39dc2e455d43756903671 (diff) |
* lisp/net/rcirc.el (rcirc-prompt-for-encryption): New function.
(rcirc): Use it to prompt for encryption.
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/net/rcirc.el | 21 |
2 files changed, 17 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2e0352a7bd..f5a26ed848 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-06-05 Deniz Dogan <[email protected]> + + * net/rcirc.el (rcirc-prompt-for-encryption): New function. + (rcirc): Use it to prompt for encryption. + 2011-06-05 Roland Winkler <[email protected]> * textmodes/bibtex.el (bibtex-search-buffer): New variable. diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index bd9d6846a4..bf4faba519 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -455,15 +455,7 @@ If ARG is non-nil, instead prompt for connection parameters." :channels) " ")) "[, ]+" t)) - (encryption - (intern (completing-read "Encryption (default plain): " - '("plain" "tls") - nil t - (let ((choice (plist-get server-plist - :encryption))) - (when choice - (symbol-name choice))) - nil "plain")))) + (encryption (rcirc-prompt-for-encryption server-plist))) (rcirc-connect server port nick user-name rcirc-default-full-name channels password encryption)) @@ -596,6 +588,17 @@ If ARG is non-nil, instead prompt for connection parameters." (time-to-seconds (current-time)) (float-time))) +(defun rcirc-prompt-for-encryption (server-plist) + "Prompt the user for the encryption method to use. +SERVER-PLIST is the property list for the server." + (let ((msg "Encryption (default %s): ") + (choices '("plain" "tls")) + (default (or (plist-get server-plist :encryption) + "plain"))) + (intern + (completing-read (format msg default) + choices nil t "" nil default)))) + (defun rcirc-keepalive () "Send keep alive pings to active rcirc processes. Kill processes that have not received a server message since the |