Function: erc-compute-nick

erc-compute-nick is a byte-compiled function defined in erc.el.gz.

Signature

(erc-compute-nick &optional NICK)

Documentation

Return user's IRC nick.

This tries a progressively greater number of default methods until a non-nil value is found.

- NICK (the argument passed to this function)
- The erc-nick option
- The value of the IRCNICK environment variable
- The result from the user-login-name(var)/user-login-name(fun) function

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-compute-nick (&optional nick)
  "Return user's IRC nick.

This tries a progressively greater number of default methods until a
non-nil value is found.

- NICK (the argument passed to this function)
- The `erc-nick' option
- The value of the IRCNICK environment variable
- The result from the `user-login-name' function"
  (or nick
      (if (consp erc-nick) (car erc-nick) erc-nick)
      (getenv "IRCNICK")
      (user-login-name)))