Changeset 4200 for trunk/lisp/erc/erc-identd.el
- Timestamp:
- 04/07/07 15:49:28 (2 years ago)
- Files:
-
- trunk/lisp/erc/erc-identd.el (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/erc/erc-identd.el
r4190 r4200 43 43 (defvar erc-identd-process nil) 44 44 45 (defgroup erc-identd nil 46 "Run a local identd server." 47 :group 'erc) 48 49 (defcustom erc-identd-port 8113 50 "Port to run the identd server on if not specified in the argument for 51 `erc-identd-start'. 52 53 This can be either a string or a number." 54 :group 'erc-identd 55 :type '(choice (const :tag "None" nil) 56 (integer :tag "Port number") 57 (string :tag "Port string"))) 58 45 59 ;;;###autoload (autoload 'erc-identd-mode "erc-identd") 46 60 (define-erc-module identd nil 47 61 "This mode launches an identd server on port 8113." 48 ((add-hook 'erc-connect-pre-hook 'erc-identd- start)62 ((add-hook 'erc-connect-pre-hook 'erc-identd-quickstart) 49 63 (add-hook 'erc-disconnected-hook 'erc-identd-stop)) 50 ((remove-hook 'erc-connect-pre-hook 'erc-identd- start)64 ((remove-hook 'erc-connect-pre-hook 'erc-identd-quickstart) 51 65 (remove-hook 'erc-disconnected-hook 'erc-identd-stop))) 52 66 … … 72 86 system." 73 87 (interactive (list (read-string "Serve identd requests on port: " "8113"))) 74 (if (null port) 75 (setq port 8113) 76 (if (stringp port) 77 (setq port (string-to-number port)))) 78 (if erc-identd-process 79 (delete-process erc-identd-process)) 88 (unless port (setq port erc-identd-port)) 89 (when (stringp port) 90 (setq port (string-to-number port))) 91 (when erc-identd-process 92 (delete-process erc-identd-process)) 80 93 (setq erc-identd-process 81 94 (make-network-process :name "identd" … … 85 98 :filter 'erc-identd-filter)) 86 99 (set-process-query-on-exit-flag erc-identd-process nil)) 100 101 (defun erc-identd-quickstart (&rest ignored) 102 "Start the identd server with the default port. 103 The default port is specified by `erc-identd-port'." 104 (erc-identd-start)) 87 105 88 106 ;;;###autoload
