- (if (string-match (rx (: "\01ACTION " (group (* (not "\01"))) "\01")) text)
- (lurk-display-string context to " * " from " " (match-string 1 text))
- (lurk-display-string
- context
- (pcase (lurk-get-context-type to)
- ('channel (concat to " <" from "> "))
- ('nick (concat "[" from " -> " to "] "))
- (_
- (error "Unsupported context type")))
- text))))
+ (lurk-display-string
+ context
+ (pcase (lurk-get-context-type to)
+ ('channel (concat to " <" from "> "))
+ ('nick (concat "[" from " -> " to "] "))
+ (_
+ (error "Unsupported context type")))
+ text)))
+
+(defun lurk-display-action (from to action-text)
+ (let ((context (if (eq 'channel (lurk-get-context-type to))
+ to
+ (if (equal to lurk-nick) from to))))
+ (lurk-display-string
+ context
+ "* " from " " action-text)))
+