1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-12 16:23:57 +00:00

ERC: Better user mode support

Fixes: debbugs:17755
This commit is contained in:
Kelvin White 2014-06-19 12:56:18 -04:00
parent d10a551d9d
commit 7a4114e4e0
3 changed files with 2034 additions and 1925 deletions

View File

@ -1,3 +1,17 @@
2014-06-19 Kelvin White <kelvin.white77@gmail.com>
* erc-backend.el: Handle user modes in relevant server responses
* erc.el: Better user mode support.
(erc-channel-user): Add members for new modes.
(erc-channel-member-halfop-p, erc-channel-user-admin-p)
(erc-channel-user-owner-p): Use new struct members.
(erc-format-nick, erc-format-@nick): Display user modes as nick prefix.
(erc-nick-prefix-face, erc-my-nick-prefix-face): Add new faces
(erc-get-user-mode-prefix): Return symbol for mode prefix.
(erc-update-channel-member, erc-update-current-channel-member)
(erc-channel-receive-names): Update channel users.
(erc-nick-at-point): Return correct user info.
2014-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
* erc.el (erc-invite-only-mode, erc-toggle-channel-mode): Simplify.
@ -615,4 +629,3 @@ See ChangeLog.08 for earlier changes.
;; coding: utf-8
;; add-log-time-zone-rule: t
;; End:

View File

@ -679,7 +679,7 @@ Conditionally try to reconnect and take appropriate action."
(when (buffer-live-p buf)
(with-current-buffer buf
(erc-log (format
"SENTINEL: proc: %S status: %S event: %S (quitting: %S)"
"SENTINEL: proc: %S status: %S event: %S (quitting: %S)"
cproc (process-status cproc) event erc-server-quitting))
(if (string-match "^open" event)
;; newly opened connection (no wait)
@ -1208,7 +1208,6 @@ add things to `%s' instead."
parsed 'notice 'active
'INVITE ?n nick ?u login ?h host ?c chnl)))))
(define-erc-response-handler (JOIN)
"Handle join messages."
nil
@ -1244,7 +1243,7 @@ add things to `%s' instead."
(erc-format-message
'JOIN ?n nick ?u login ?h host ?c chnl))))))
(when buffer (set-buffer buffer))
(erc-update-channel-member chnl nick nick t nil nil host login)
(erc-update-channel-member chnl nick nick t nil nil nil nil nil host login)
;; on join, we want to stay in the new channel buffer
;;(set-buffer ob)
(erc-display-message parsed nil buffer str))))))
@ -1413,7 +1412,7 @@ add things to `%s' instead."
;; message. We will accumulate private identities indefinitely
;; at this point.
(erc-update-channel-member (if privp nick tgt) nick nick
privp nil nil host login nil nil t)
privp nil nil nil nil nil host login nil nil t)
(let ((cdata (erc-get-channel-user nick)))
(setq fnick (funcall erc-format-nick-function
(car cdata) (cdr cdata))))))
@ -1470,7 +1469,7 @@ add things to `%s' instead."
(current-time))))
(pcase-let ((`(,nick ,login ,host)
(erc-parse-user (erc-response.sender parsed))))
(erc-update-channel-member ch nick nick nil nil nil host login)
(erc-update-channel-member ch nick nick nil nil nil nil nil nil host login)
(erc-update-channel-topic ch (format "%s\C-o (%s, %s)" topic nick time))
(erc-display-message parsed 'notice (erc-get-buffer ch proc)
'TOPIC ?n nick ?u login ?h host
@ -1800,8 +1799,7 @@ See `erc-display-server-message'." nil
(when (string-match "\\(^[0-9]+ \\)\\(.*\\)$" full-name)
(setq hopcount (match-string 1 full-name))
(setq full-name (match-string 2 full-name)))
(erc-update-channel-member channel nick nick nil nil nil host
user full-name)
(erc-update-channel-member channel nick nick nil nil nil nil nil nil host user full-name)
(erc-display-message parsed 'notice 'active 's352
?c channel ?n nick ?a away-flag
?u user ?h host ?f full-name))))

File diff suppressed because it is too large Load Diff