+2008-08-20 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-mixi.el (riece-mixi-message-filter-function): New function.
+ (riece-mixi-insinuate): Use it.
+ (riece-mixi-uninstall): New function.
+
2008-08-18 OHASHI Akira <bg66@koka-in.org>
* mixi.el (mixi-warning-continuously-accessing): Follow the change of
;;; riece-mixi.el --- Riece integration for mixi
-;; Copyright (C) 2007 OHASHI Akira
+;; Copyright (C) 2007, 2008 OHASHI Akira
;; Author: OHASHI Akira <bg66@koka-in.org>
;; Keywords: IRC, riece
riece-mixi-check-alist)
(setq riece-mixi-last-check (current-time))))
+(defun riece-mixi-message-filter-function (message)
+ (when (and (get 'riece-mixi 'riece-addon-enabled)
+ (riece-message-own-p message)
+ (eq 'action (riece-message-type message)))
+ (mixi-post-echo (riece-message-text message))))
+
(defun riece-mixi-insinuate ()
(add-hook 'riece-after-display-message-functions
- 'riece-mixi-display-message-function))
+ 'riece-mixi-display-message-function)
+ (add-hook 'riece-message-filter-functions
+ 'riece-mixi-message-filter-function))
+
+(defun riece-mixi-uninstall ()
+ (remove-hook 'riece-after-display-message-functions
+ 'riece-mixi-display-message-function)
+ (remove-hook 'riece-message-filter-functions
+ 'riece-mixi-message-filter-function))
(defun riece-mixi-enable ()
(when riece-mixi-check-alist