- riece-unread-channels))
- (riece-unread-update-channel-list-buffer))
-
-(defun riece-unread-update-channel-list-buffer ()
- (if riece-channel-list-buffer-mode
- (save-excursion
- (set-buffer riece-channel-list-buffer)
- (let ((inhibit-read-only t)
- buffer-read-only)
- (goto-char (point-min))
- (while (not (eobp))
- (if (looking-at "\\( ?[0-9]+:\\)\\([ !]\\)\\(.+\\)")
- (let ((channel (save-match-data
- (riece-parse-identity (match-string 3)))))
- (replace-match
- (concat "\\1"
- (if (member channel riece-unread-channels)
- "!"
- " ")
- "\\3"))))
- (forward-line))))))
-
+ riece-unread-channels)))
+
+(defun riece-unread-format-channel-list-line (index channel)
+ (if (riece-identity-member channel riece-unread-channels)
+ (concat (format "%2d:!" index)
+ (riece-format-identity channel)
+ "\n")))
+