- (let* ((to-type (lurk-get-context-type to))
- (display-fun (cadr (assoc to-type lurk-context-table))))
- (funcall display-fun from to text)))
-
-(defun lurk-display-channel-message (from to text)
- (lurk-display-string
- (propertize (concat to
- " <" from "> "
- text)
- 'face 'lurk-text)))
-
-
-(defun lurk-display-action (channel-name nick action)
- (lurk-display-string (concat channel-name
- " * "
- (propertize (concat nick " " action)
- 'face 'lurk-text))))
-
-(defun lurk-display-private-message (from to text)
+ (let ((context (if (equal from lirc-nick) to from)))
+ (lurk-display-string
+ (propertize
+ (pcase (lurk-get-context-type to)
+ ('channel (concat to " <" from "> " text))
+ ('nick (concat "[" from " -> " to "] " text))
+ (_
+ (error "Unsupported context type")))
+ 'face 'lurk-text
+ 'help-echo (concat "Context: " to)))))
+
+(defun lurk-display-notice (context &rest notices)