Changeset 4200 for trunk/lisp/erc/erc-capab.el
- Timestamp:
- 04/07/07 15:49:28 (2 years ago)
- Files:
-
- trunk/lisp/erc/erc-capab.el (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/erc/erc-capab.el
r4190 r4200 57 57 58 58 ;; `erc-capab-identify-prefix' will now be added to the beginning of 59 ;; unidentified users' nicknames. The default is an asterisk, "*". If 60 ;; the value of this variable is nil or you disable this module (see 59 ;; unidentified users' nicknames. The default is an asterisk, "*". 60 ;; You can customize the prefix and the face used to display it, 61 ;; `erc-capab-identify-unidentified'. If the value of 62 ;; `erc-capab-identify-prefix' is nil or you disable this module (see 61 63 ;; `erc-capab-identify-disable'), no prefix will be inserted, but the 62 64 ;; flag sent by the server will still be stripped. … … 74 76 75 77 (defcustom erc-capab-identify-prefix "*" 76 "The prefix used for unidentified users." 78 "The prefix used for unidentified users. 79 80 If you change this from the default \"*\", be sure to use a 81 character not found in IRC nicknames to avoid confusion." 77 82 :group 'erc-capab 78 83 :type '(choice string (const nil))) 79 84 85 (defface erc-capab-identify-unidentified '((t)) ; same as `erc-default-face' 86 "Face to use for `erc-capab-identify-prefix'." 87 :group 'erc-capab 88 :group 'erc-faces) 89 80 90 ;;; Define module: 81 82 (define-erc-response-handler (290)83 "Handle dancer-ircd CAPAB messages." nil nil)84 91 85 92 ;;;###autoload (autoload 'erc-capab-identify-mode "erc-capab" nil t) … … 125 132 `erc-server-005-functions'." 126 133 (unless erc-capab-identify-sent 127 (erc-capab- send-identify-messages)))128 129 (defun erc-capab- send-identify-messages ()134 (erc-capab-identify-send-messages))) 135 136 (defun erc-capab-identify-send-messages () 130 137 "Send CAPAB IDENTIFY messages if the server supports it." 131 138 (when (and (stringp erc-server-version) … … 176 183 (erc-with-server-buffer erc-capab-identify-activated)) 177 184 (goto-char (or (erc-find-parsed-property) (point-min))) 178 (let ((nickname (erc-capab- get-unidentified-nickname185 (let ((nickname (erc-capab-identify-get-unidentified-nickname 179 186 (erc-get-parsed-vector (point))))) 180 187 (when (and nickname … … 184 191 (goto-char (match-beginning 0)) 185 192 (insert (erc-propertize erc-capab-identify-prefix 186 'face (get-char-property (- (point) 1) 187 'face))))))) 188 189 (defun erc-capab-get-unidentified-nickname (parsed) 193 'face 'erc-capab-identify-unidentified)))))) 194 195 (defun erc-capab-identify-get-unidentified-nickname (parsed) 190 196 "Return the nickname of the user if unidentified. 191 197 PARSED is an `erc-parsed' response struct."
