All pastes #35553 Raw Edit

Stuff

public text v1 · immutable
#35553 ·published 2006-01-02 20:32 UTC
rendered paste body
Index: alexis/hooks.lisp
===================================================================
--- alexis/hooks.lisp   (revision 329)
+++ alexis/hooks.lisp   (working copy)
@@ -108,8 +108,22 @@
          (channel (trailing-argument message))
          (chan-mon (when monitor
                      (channel-monitor monitor channel)))
+         (kb (when chan-mon (knowledge chan-mon)))
+         (kb-item (when kb (find-knowledge kb user)))
          (memos (when chan-mon
                   (query-memos chan-mon user))))
+
+    ;; announce the person if applicable
+    (print kb-item)
+    (when kb-item
+      (send-message-to monitor channel
+                       (if (listp kb-item)
+                           (mapcar #'(lambda (x)
+                                       (string-trim '(#\Space) x))
+                                   kb-item)
+                         kb-item)))