* rcirc update: allow sending a server password when connecting
@ 2010-05-06 1:02 Ryan Yeske
2010-05-06 6:51 ` Deniz Dogan
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Ryan Yeske @ 2010-05-06 1:02 UTC (permalink / raw)
To: emacs-devel
2010-05-01 Ryan Yeske <rcyeske@gmail.com>
* net/rcirc.el (rcirc-default-user-name): Change to "user".
(rcirc-default-full-name): Change to "unknown".
(rcirc-user-name-history): Add variable.
(rcirc): When prompting for connection paramaters, also prompt for
username and password.
(rcirc-connect): Take a PASS argument. If PASS is non-nil, send
value to server when connecting.
=== modified file 'lisp/net/rcirc.el'
--- lisp/net/rcirc.el 2010-01-13 08:35:10 +0000
+++ lisp/net/rcirc.el 2010-05-06 00:59:16 +0000
@@ -85,6 +85,10 @@
VALUE must be a string. If absent, `rcirc-default-full-name' is
used.
+`:pass'
+
+VALUE must be a string.
+
`:channels'
VALUE must be a list of strings describing which channels to join
@@ -95,6 +99,7 @@
(:port integer)
(:user-name string)
(:full-name string)
+ (:pass string)
(:channels (repeat string)))))
:group 'rcirc)
@@ -108,14 +113,12 @@
:type 'string
:group 'rcirc)
-(defcustom rcirc-default-user-name (user-login-name)
+(defcustom rcirc-default-user-name "user"
"Your user name sent to the server when connecting."
:type 'string
:group 'rcirc)
-(defcustom rcirc-default-full-name (if (string= (user-full-name) "")
- rcirc-default-user-name
- (user-full-name))
+(defcustom rcirc-default-full-name "unknown"
"The full name sent to the server when connecting."
:type 'string
:group 'rcirc)
@@ -369,6 +372,9 @@
(defvar rcirc-nick-name-history nil
"History variable for \\[rcirc] call.")
+(defvar rcirc-user-name-history nil
+ "History variable for \\[rcirc] call.")
+
;;;###autoload
(defun rcirc (arg)
"Connect to all servers in `rcirc-server-alist'.
@@ -393,6 +399,12 @@
(or (plist-get server-plist :nick)
rcirc-default-nick)
'rcirc-nick-name-history))
+ (user-name (read-string "IRC Username: "
+ (or (plist-get server-plist :user-name)
+ rcirc-default-user-name)
+ 'rcirc-user-name-history))
+ (pass (read-passwd "IRC Password: " nil
+ (plist-get server-plist :pass)))
(channels (split-string
(read-string "IRC Channels: "
(mapconcat 'identity
@@ -400,7 +412,7 @@
:channels)
" "))
"[, ]+" t)))
- (rcirc-connect server port nick rcirc-default-user-name
+ (rcirc-connect server port nick user-name pass
rcirc-default-full-name
channels))
;; connect to servers in `rcirc-server-alist'
@@ -411,6 +423,7 @@
(port (or (plist-get (cdr c) :port) rcirc-default-port))
(user-name (or (plist-get (cdr c) :user-name)
rcirc-default-user-name))
+ (pass (plist-get (cdr c) :pass))
(full-name (or (plist-get (cdr c) :full-name)
rcirc-default-full-name))
(channels (plist-get (cdr c) :channels)))
@@ -421,7 +434,7 @@
(setq connected p)))
(if (not connected)
(condition-case e
- (rcirc-connect server port nick user-name
+ (rcirc-connect server port nick user-name pass
full-name channels)
(quit (message "Quit connecting to %s" server)))
(with-current-buffer (process-buffer connected)
@@ -453,8 +466,8 @@
(defvar rcirc-process nil)
;;;###autoload
-(defun rcirc-connect (server &optional port nick user-name full-name
- startup-channels)
+(defun rcirc-connect (server &optional port nick user-name pass
+ full-name startup-channels)
(save-excursion
(message "Connecting to %s..." server)
(let* ((inhibit-eol-conversion)
@@ -503,10 +516,11 @@
(add-hook 'auto-save-hook 'rcirc-log-write)
;; identify
+ (when pass
+ (rcirc-send-string process (concat "PASS " pass)))
(rcirc-send-string process (concat "NICK " nick))
(rcirc-send-string process (concat "USER " user-name
- " hostname servername :"
- full-name))
+ " 0 * :" full-name))
;; setup ping timer if necessary
(unless rcirc-keepalive-timer
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rcirc update: allow sending a server password when connecting
2010-05-06 1:02 rcirc update: allow sending a server password when connecting Ryan Yeske
@ 2010-05-06 6:51 ` Deniz Dogan
2010-05-25 3:39 ` Glenn Morris
2010-05-25 19:33 ` Michael Albinus
2 siblings, 0 replies; 9+ messages in thread
From: Deniz Dogan @ 2010-05-06 6:51 UTC (permalink / raw)
To: Ryan Yeske; +Cc: emacs-devel
2010/5/6 Ryan Yeske <rcyeske@gmail.com>:
>
> 2010-05-01 Ryan Yeske <rcyeske@gmail.com>
>
> * net/rcirc.el (rcirc-default-user-name): Change to "user".
> (rcirc-default-full-name): Change to "unknown".
> (rcirc-user-name-history): Add variable.
> (rcirc): When prompting for connection paramaters, also prompt for
> username and password.
> (rcirc-connect): Take a PASS argument. If PASS is non-nil, send
> value to server when connecting.
>
>
>
>
> === modified file 'lisp/net/rcirc.el'
> --- lisp/net/rcirc.el 2010-01-13 08:35:10 +0000
> +++ lisp/net/rcirc.el 2010-05-06 00:59:16 +0000
> @@ -85,6 +85,10 @@
> VALUE must be a string. If absent, `rcirc-default-full-name' is
> used.
>
> +`:pass'
> +
> +VALUE must be a string.
> +
> `:channels'
>
> VALUE must be a list of strings describing which channels to join
> @@ -95,6 +99,7 @@
> (:port integer)
> (:user-name string)
> (:full-name string)
> + (:pass string)
> (:channels (repeat string)))))
> :group 'rcirc)
>
> @@ -108,14 +113,12 @@
> :type 'string
> :group 'rcirc)
>
> -(defcustom rcirc-default-user-name (user-login-name)
> +(defcustom rcirc-default-user-name "user"
> "Your user name sent to the server when connecting."
> :type 'string
> :group 'rcirc)
>
> -(defcustom rcirc-default-full-name (if (string= (user-full-name) "")
> - rcirc-default-user-name
> - (user-full-name))
> +(defcustom rcirc-default-full-name "unknown"
> "The full name sent to the server when connecting."
> :type 'string
> :group 'rcirc)
> @@ -369,6 +372,9 @@
> (defvar rcirc-nick-name-history nil
> "History variable for \\[rcirc] call.")
>
> +(defvar rcirc-user-name-history nil
> + "History variable for \\[rcirc] call.")
> +
> ;;;###autoload
> (defun rcirc (arg)
> "Connect to all servers in `rcirc-server-alist'.
> @@ -393,6 +399,12 @@
> (or (plist-get server-plist :nick)
> rcirc-default-nick)
> 'rcirc-nick-name-history))
> + (user-name (read-string "IRC Username: "
> + (or (plist-get server-plist :user-name)
> + rcirc-default-user-name)
> + 'rcirc-user-name-history))
> + (pass (read-passwd "IRC Password: " nil
> + (plist-get server-plist :pass)))
> (channels (split-string
> (read-string "IRC Channels: "
> (mapconcat 'identity
> @@ -400,7 +412,7 @@
> :channels)
> " "))
> "[, ]+" t)))
> - (rcirc-connect server port nick rcirc-default-user-name
> + (rcirc-connect server port nick user-name pass
> rcirc-default-full-name
> channels))
> ;; connect to servers in `rcirc-server-alist'
> @@ -411,6 +423,7 @@
> (port (or (plist-get (cdr c) :port) rcirc-default-port))
> (user-name (or (plist-get (cdr c) :user-name)
> rcirc-default-user-name))
> + (pass (plist-get (cdr c) :pass))
> (full-name (or (plist-get (cdr c) :full-name)
> rcirc-default-full-name))
> (channels (plist-get (cdr c) :channels)))
> @@ -421,7 +434,7 @@
> (setq connected p)))
> (if (not connected)
> (condition-case e
> - (rcirc-connect server port nick user-name
> + (rcirc-connect server port nick user-name pass
> full-name channels)
> (quit (message "Quit connecting to %s" server)))
> (with-current-buffer (process-buffer connected)
> @@ -453,8 +466,8 @@
> (defvar rcirc-process nil)
>
> ;;;###autoload
> -(defun rcirc-connect (server &optional port nick user-name full-name
> - startup-channels)
> +(defun rcirc-connect (server &optional port nick user-name pass
> + full-name startup-channels)
> (save-excursion
> (message "Connecting to %s..." server)
> (let* ((inhibit-eol-conversion)
> @@ -503,10 +516,11 @@
> (add-hook 'auto-save-hook 'rcirc-log-write)
>
> ;; identify
> + (when pass
> + (rcirc-send-string process (concat "PASS " pass)))
> (rcirc-send-string process (concat "NICK " nick))
> (rcirc-send-string process (concat "USER " user-name
> - " hostname servername :"
> - full-name))
> + " 0 * :" full-name))
>
> ;; setup ping timer if necessary
> (unless rcirc-keepalive-timer
>
>
>
>
Finally, eh? :)
--
Deniz Dogan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rcirc update: allow sending a server password when connecting
2010-05-06 1:02 rcirc update: allow sending a server password when connecting Ryan Yeske
2010-05-06 6:51 ` Deniz Dogan
@ 2010-05-25 3:39 ` Glenn Morris
2010-05-25 4:43 ` Ryan Yeske
2010-05-25 19:33 ` Michael Albinus
2 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2010-05-25 3:39 UTC (permalink / raw)
To: Ryan Yeske; +Cc: emacs-devel
Thank you; installed. Sorry for the delay.
Not sure what the reason for changing the user and name defaults is,
but you should bump the :version of defcustoms whan changing the
defaults.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rcirc update: allow sending a server password when connecting
2010-05-25 3:39 ` Glenn Morris
@ 2010-05-25 4:43 ` Ryan Yeske
2010-05-25 8:22 ` Glenn Morris
0 siblings, 1 reply; 9+ messages in thread
From: Ryan Yeske @ 2010-05-25 4:43 UTC (permalink / raw)
To: Glenn Morris; +Cc: emacs-devel
Glenn Morris <rgm@gnu.org> writes:
> Thank you; installed. Sorry for the delay.
Thanks for committing, Glenn.
> Not sure what the reason for changing the user and name defaults is,
> but you should bump the :version of defcustoms whan changing the
> defaults.
Mmm, yeah. Maybe I shouldn't have done that in the same change, its
separate from the PASS change. I was getting complaints from some users
about how the client exposes info that some users would prefer to keep
anonymous. I happened to be around that code, so took the opportunity
to post that change as well.
Is there a better way generally to post changes to rcirc than patches to
this list now that we are using bzr? I just changed over from CVS with
emacs, and it is now easier for me to track my own changes to emacs and
rcirc.
Ryan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rcirc update: allow sending a server password when connecting
2010-05-25 4:43 ` Ryan Yeske
@ 2010-05-25 8:22 ` Glenn Morris
2010-05-25 10:26 ` Juanma Barranquero
0 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2010-05-25 8:22 UTC (permalink / raw)
To: Ryan Yeske; +Cc: emacs-devel
Ryan Yeske wrote:
> Mmm, yeah. Maybe I shouldn't have done that in the same change, its
> separate from the PASS change. I was getting complaints from some users
> about how the client exposes info that some users would prefer to keep
> anonymous. I happened to be around that code, so took the opportunity
> to post that change as well.
No, it's fine, I was just curious. If you don't have commit access,
it's fine (IMO) to post multiple things in the same patch, otherwise
it's more work for the person applying things.
> Is there a better way generally to post changes to rcirc than patches to
> this list now that we are using bzr?
Oh, everything's better in the land of distributed version control, so
I am sure there must be!
There's a bzr send command; no idea how or what it is good for...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rcirc update: allow sending a server password when connecting
2010-05-25 8:22 ` Glenn Morris
@ 2010-05-25 10:26 ` Juanma Barranquero
0 siblings, 0 replies; 9+ messages in thread
From: Juanma Barranquero @ 2010-05-25 10:26 UTC (permalink / raw)
To: Glenn Morris; +Cc: Ryan Yeske, emacs-devel
On Tue, May 25, 2010 at 10:22, Glenn Morris <rgm@gnu.org> wrote:
> No, it's fine, I was just curious. If you don't have commit access,
> it's fine (IMO) to post multiple things in the same patch, otherwise
> it's more work for the person applying things.
Multiple patches in the same e-mail, perhaps. Multiple unrelated
things in the same patch is more work, not less (unless the patch is
commited as is, which shouldn't).
Juanma
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rcirc update: allow sending a server password when connecting
2010-05-06 1:02 rcirc update: allow sending a server password when connecting Ryan Yeske
2010-05-06 6:51 ` Deniz Dogan
2010-05-25 3:39 ` Glenn Morris
@ 2010-05-25 19:33 ` Michael Albinus
2010-05-26 16:21 ` Ryan Yeske
2 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2010-05-25 19:33 UTC (permalink / raw)
To: Ryan Yeske; +Cc: emacs-devel
Ryan Yeske <rcyeske@gmail.com> writes:
> 2010-05-01 Ryan Yeske <rcyeske@gmail.com>
>
> * net/rcirc.el (rcirc-default-user-name): Change to "user".
> (rcirc-default-full-name): Change to "unknown".
> (rcirc-user-name-history): Add variable.
> (rcirc): When prompting for connection paramaters, also prompt for
> username and password.
> (rcirc-connect): Take a PASS argument. If PASS is non-nil, send
> value to server when connecting.
Wouldn't it make sense to keep the password in a password manager, if
possible? We are at least able to access the Gnome Keyring and the KDE
KWallet (this is delayed). Other IRC clients do this already, like
Empathy. See here my IRC and Jabber account settings, accessed via
secrets.el:
[-] login
|-[+] UbuntuOne token for https://ubuntuone.com
|-[+] albinus@ford:10443/DAV-albinus
|-[-] account: idle/irc/albinus0; param: password
| |- password: ****** [Show password]
| |- account: idle/irc/albinus0
| `- param: password
|-[+] Network secret for Auto Paniclan/802-11-wireless-security/psk
|-[+] albinus@magdalene
|-[-] account: gabble/jabber/albinus_40jabber_2eorg0; param: password
| |- password: ********* [Show password]
| |- account: gabble/jabber/albinus_40jabber_2eorg0
| `- param: password
|-[+] Desktop Couch user authentication
`-[+] Desktop Couch user authentication
Best regards, Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rcirc update: allow sending a server password when connecting
2010-05-25 19:33 ` Michael Albinus
@ 2010-05-26 16:21 ` Ryan Yeske
2010-05-26 19:30 ` Michael Albinus
0 siblings, 1 reply; 9+ messages in thread
From: Ryan Yeske @ 2010-05-26 16:21 UTC (permalink / raw)
To: Michael Albinus; +Cc: emacs-devel
Michael Albinus <michael.albinus@gmx.de> writes:
> Wouldn't it make sense to keep the password in a password manager, if
> possible? We are at least able to access the Gnome Keyring and the KDE
> KWallet (this is delayed). Other IRC clients do this already, like
> Empathy. See here my IRC and Jabber account settings, accessed via
> secrets.el:
Hi Michael,
That makes sense, yes. Does emacs have an interface to those keyring
facilities?
Ryan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rcirc update: allow sending a server password when connecting
2010-05-26 16:21 ` Ryan Yeske
@ 2010-05-26 19:30 ` Michael Albinus
0 siblings, 0 replies; 9+ messages in thread
From: Michael Albinus @ 2010-05-26 19:30 UTC (permalink / raw)
To: Ryan Yeske; +Cc: emacs-devel
Ryan Yeske <rcyeske@gmail.com> writes:
> Hi Michael,
Hi Ryan,
> That makes sense, yes. Does emacs have an interface to those keyring
> facilities?
Yes, secrets.el. On a recent build just apply "M-x secrets-show-secrets".
You need Gnome 2.30 for this (like in Ubuntu 10.04 or Fedora 13).
KWallet will also provide an implementation; I don't know the recent status.
> Ryan
Best regards, Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-05-26 19:30 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06 1:02 rcirc update: allow sending a server password when connecting Ryan Yeske
2010-05-06 6:51 ` Deniz Dogan
2010-05-25 3:39 ` Glenn Morris
2010-05-25 4:43 ` Ryan Yeske
2010-05-25 8:22 ` Glenn Morris
2010-05-25 10:26 ` Juanma Barranquero
2010-05-25 19:33 ` Michael Albinus
2010-05-26 16:21 ` Ryan Yeske
2010-05-26 19:30 ` Michael Albinus
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.