aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeniz Dogan2011-06-05 21:03:28 +0200
committerDeniz Dogan2011-06-05 21:03:28 +0200
commitac09b8a1289ec8f8a71c8dc55d4eeebaf2600707 (patch)
tree784a0cb99eb1d82e5984762991cbba169e32d2ad
parent34699b85fd84223412b39dc2e455d43756903671 (diff)
downloademacs-ac09b8a1289ec8f8a71c8dc55d4eeebaf2600707.tar.gz
emacs-ac09b8a1289ec8f8a71c8dc55d4eeebaf2600707.zip
* lisp/net/rcirc.el (rcirc-prompt-for-encryption): New function.
(rcirc): Use it to prompt for encryption.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/rcirc.el21
2 files changed, 17 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2e0352a7bdf..f5a26ed8482 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-06-05 Deniz Dogan <deniz@dogan.se>
2
3 * net/rcirc.el (rcirc-prompt-for-encryption): New function.
4 (rcirc): Use it to prompt for encryption.
5
12011-06-05 Roland Winkler <winkler@gnu.org> 62011-06-05 Roland Winkler <winkler@gnu.org>
2 7
3 * textmodes/bibtex.el (bibtex-search-buffer): New variable. 8 * textmodes/bibtex.el (bibtex-search-buffer): New variable.
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index bd9d6846a4b..bf4faba5197 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."
455 :channels) 455 :channels)
456 " ")) 456 " "))
457 "[, ]+" t)) 457 "[, ]+" t))
458 (encryption 458 (encryption (rcirc-prompt-for-encryption server-plist)))
459 (intern (completing-read "Encryption (default plain): "
460 '("plain" "tls")
461 nil t
462 (let ((choice (plist-get server-plist
463 :encryption)))
464 (when choice
465 (symbol-name choice)))
466 nil "plain"))))
467 (rcirc-connect server port nick user-name 459 (rcirc-connect server port nick user-name
468 rcirc-default-full-name 460 rcirc-default-full-name
469 channels password encryption)) 461 channels password encryption))
@@ -596,6 +588,17 @@ If ARG is non-nil, instead prompt for connection parameters."
596 (time-to-seconds (current-time)) 588 (time-to-seconds (current-time))
597 (float-time))) 589 (float-time)))
598 590
591(defun rcirc-prompt-for-encryption (server-plist)
592 "Prompt the user for the encryption method to use.
593SERVER-PLIST is the property list for the server."
594 (let ((msg "Encryption (default %s): ")
595 (choices '("plain" "tls"))
596 (default (or (plist-get server-plist :encryption)
597 "plain")))
598 (intern
599 (completing-read (format msg default)
600 choices nil t "" nil default))))
601
599(defun rcirc-keepalive () 602(defun rcirc-keepalive ()
600 "Send keep alive pings to active rcirc processes. 603 "Send keep alive pings to active rcirc processes.
601Kill processes that have not received a server message since the 604Kill processes that have not received a server message since the