diff options
author | Miles Bader <miles@gnu.org> | 2007-04-01 13:36:38 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-04-01 13:36:38 +0000 |
commit | ff59d266c7dcb9c6f7cc7ff7942510bda288e167 (patch) | |
tree | 9cc762d166a00ae8d02c9f079890afb68125072e /lisp/erc/erc-identd.el | |
parent | 25c8c1594fe7ba177ec0621260304181b7052af3 (diff) | |
download | emacs-ff59d266c7dcb9c6f7cc7ff7942510bda288e167.tar.gz |
Release ERC 5.2.
I have updated the version of ERC to 5.2, since it fixes a bug with C-c
C-SPC being bound globally by default. For the full list of changes in
this version, see etc/ERC-NEWS.
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-687
Creator: Michael Olson <mwolson@gnu.org>
Diffstat (limited to 'lisp/erc/erc-identd.el')
-rw-r--r-- | lisp/erc/erc-identd.el | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/lisp/erc/erc-identd.el b/lisp/erc/erc-identd.el index c7f7c615e92..8a70a743edb 100644 --- a/lisp/erc/erc-identd.el +++ b/lisp/erc/erc-identd.el @@ -42,12 +42,26 @@ (defvar erc-identd-process nil) +(defgroup erc-identd nil + "Run a local identd server." + :group 'erc) + +(defcustom erc-identd-port 8113 + "Port to run the identd server on if not specified in the argument for +`erc-identd-start'. + +This can be either a string or a number." + :group 'erc-identd + :type '(choice (const :tag "None" nil) + (integer :tag "Port number") + (string :tag "Port string"))) + ;;;###autoload (autoload 'erc-identd-mode "erc-identd") (define-erc-module identd nil "This mode launches an identd server on port 8113." - ((add-hook 'erc-connect-pre-hook 'erc-identd-start) + ((add-hook 'erc-connect-pre-hook 'erc-identd-quickstart) (add-hook 'erc-disconnected-hook 'erc-identd-stop)) - ((remove-hook 'erc-connect-pre-hook 'erc-identd-start) + ((remove-hook 'erc-connect-pre-hook 'erc-identd-quickstart) (remove-hook 'erc-disconnected-hook 'erc-identd-stop))) (defun erc-identd-filter (proc string) @@ -71,12 +85,11 @@ run from inetd. The idea is to provide a simple identd server when you need one, without having to install one globally on your system." (interactive (list (read-string "Serve identd requests on port: " "8113"))) - (if (null port) - (setq port 8113) - (if (stringp port) - (setq port (string-to-number port)))) - (if erc-identd-process - (delete-process erc-identd-process)) + (unless port (setq port erc-identd-port)) + (when (stringp port) + (setq port (string-to-number port))) + (when erc-identd-process + (delete-process erc-identd-process)) (setq erc-identd-process (make-network-process :name "identd" :buffer nil @@ -85,6 +98,11 @@ system." :filter 'erc-identd-filter)) (set-process-query-on-exit-flag erc-identd-process nil)) +(defun erc-identd-quickstart (&rest ignored) + "Start the identd server with the default port. +The default port is specified by `erc-identd-port'." + (erc-identd-start)) + ;;;###autoload (defun erc-identd-stop (&rest ignore) (interactive) |