+(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-quickstart)
+ (add-hook 'erc-disconnected-hook 'erc-identd-stop))
+ ((remove-hook 'erc-connect-pre-hook 'erc-identd-quickstart)
+ (remove-hook 'erc-disconnected-hook 'erc-identd-stop)))
+