emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/erc/erc-identd.el,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/erc/erc-identd.el,v
Date: Fri, 14 Jul 2006 02:29:51 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     06/07/14 02:29:50

Index: lisp/erc/erc-identd.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/erc/erc-identd.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- lisp/erc/erc-identd.el      27 Mar 2006 11:27:46 -0000      1.3
+++ lisp/erc/erc-identd.el      14 Jul 2006 02:29:49 -0000      1.4
@@ -24,16 +24,32 @@
 
 ;;; Commentary:
 
-;; You can have a local identd server (running on port 8113; I use DNAT
-;; to bind 113->8113) if you add this to .emacs.el:
+;; This module allows you to run a local identd server on port 8113.
+;; You will need to set up DNAT to bind 113->8113, or use a proxy.
 
-;;    (add-hook 'erc-connect-pre-hook 'erc-identd-start)
-;;    (add-hook 'erc-disconnected-hook 'erc-identd-stop)
+;; To use this module, add identd to `erc-modules' and run
+;; `erc-update-modules'.
+
+;; Here is an example /etc/inetd.conf rule that forwards identd
+;; traffic to port 8113.  You will need simpleproxy installed for it
+;; to work.
+
+;; 113 stream tcp nowait nobody /usr/sbin/tcpd /usr/bin/simpleproxy 
simpleproxy -i -R 127.0.0.1:8113
 
 ;;; Code:
 
+(require 'erc)
+
 (defvar erc-identd-process nil)
 
+;;;###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-disconnected-hook 'erc-identd-stop))
+  ((remove-hook 'erc-connect-pre-hook 'erc-identd-start)
+   (remove-hook 'erc-disconnected-hook 'erc-identd-stop)))
+
 (defun erc-identd-filter (proc string)
   "This filter implements RFC1413 (identd authentication protocol)."
   (let ((erc-identd-process proc))
@@ -63,10 +79,11 @@
       (delete-process erc-identd-process))
   (setq erc-identd-process
        (make-network-process :name "identd"
-                             :buffer (generate-new-buffer "identd")
+                             :buffer nil
                              :host 'local :service port
-                             :server t :noquery t
-                             :filter 'erc-identd-filter)))
+                             :server t :noquery t :nowait t
+                             :filter 'erc-identd-filter))
+  (set-process-query-on-exit-flag erc-identd-process nil))
 
 ;;;###autoload
 (defun erc-identd-stop (&rest ignore)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]