diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index bbb7ccb..f210e29 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -115,7 +115,8 @@ erc-server-responses (sender "" :type string) (command "" :type string) (command-args '() :type list) - (contents "" :type string)) + (contents "" :type string) + (tags '() :type list)) ;;; User data @@ -961,10 +962,16 @@ erc-parse-server-response PROCs `process-buffer' is `current-buffer' when this function is called." (unless (string= string "") ;; Ignore empty strings (save-match-data - (let ((posn (if (eq (aref string 0) ?:) - (string-match " " string) - 0)) - (msg (make-erc-response :unparsed string))) + (let* ((tag-list (when (eq (aref string 0) ?@) + (split-string + (substring string 1 (string-match " " string)) ";"))) + (msg (make-erc-response :unparsed string :tags tag-list)) + (string (if tag-list + (substring string (+ 1 (string-match " " string))) + string)) + (posn (if (eq (aref string 0) ?:) + (string-match " " string) + 0))) (setf (erc-response.sender msg) (if (eq posn 0)