Function: erc-nick-at-point

erc-nick-at-point is an interactive and byte-compiled function defined in erc.el.gz.

Signature

(erc-nick-at-point)

Documentation

Give information about the nickname at point.

If called interactively, give a human readable message in the minibuffer. If called programmatically, return the corresponding entry of channel-members.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-nick-at-point ()
  "Give information about the nickname at `point'.

If called interactively, give a human readable message in the
minibuffer.  If called programmatically, return the corresponding
entry of `channel-members'."
  (interactive)
  (require 'thingatpt)
  (let* ((word (word-at-point))
         (channel-data (erc-get-channel-user word))
         (cuser (cdr channel-data))
         (user (if channel-data
                   (car channel-data)
                 (erc-get-server-user word)))
         host login full-name nick voice halfop op admin owner)
    (when user
      (setq nick (erc-server-user-nickname user)
            host (erc-server-user-host user)
            login (erc-server-user-login user)
            full-name (erc-server-user-full-name user))
      (if cuser
          (setq voice (erc-channel-user-voice cuser)
                halfop (erc-channel-user-halfop cuser)
                op (erc-channel-user-op cuser)
                admin (erc-channel-user-admin cuser)
                owner (erc-channel-user-owner cuser))))
    (if (called-interactively-p 'interactive)
        (message "%s is %s@%s%s%s"
                 nick login host
                 (if full-name (format " (%s)" full-name) "")
                 (if (or voice halfop op admin owner)
                     (format " and is +%s%s%s%s%s on %s"
                             (if voice "v" "")
                             (if halfop "h" "")
                             (if op "o" "")
                             (if admin "a" "")
                             (if owner "q" "")
                             (erc-default-target))
                   ""))
      user)))