;;; plum-support.el --- pirc support for plum
;; Copyright (C) 1999 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
-;; See file irchat-copyright.el for original change log and copyright info.
-;; Author: Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+;; Author: Daiki Ueno <ueno@unixuser.org>
;; Created: 1999-05-06
;; Revised: 1999-05-06
-;; Keywords: IRC, irchat, pirc
+;; Keywords: IRC, liece, pirc
-;; This file is not part of any package.
+;; This file is part of Liece.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+;;
+
;;; Code:
(require 'custom)
+(require 'liece-handle)
+(require 'liece-channel)
(defcustom plum-recent-header "plum"
"String added in front of each recent logged message"
:type 'string
- :group 'irchat-support)
+ :group 'liece-support)
(defconst plum-recent-time-header-regexp "[0-9][0-9]:[0-9][0-9]"
"Regexp for timestamp preceding in message body")
(list 'generic time (buffer-substring (point) (line-end-position)))))
)))
-(add-hook 'irchat-notice-hook 'plum-recent-add)
-(add-hook 'irchat-002-hook
+(add-hook 'liece-notice-hook 'plum-recent-add)
+(add-hook 'liece-002-hook
(function
(lambda (header rest)
- (remove-hook 'irchat-notice-hook 'plum-recent-add) )))
+ (remove-hook 'liece-notice-hook 'plum-recent-add))))
(defun plum-recent-add (header rest)
"Add recent log line into `plum-recent-log-buffer'."
- (let (fun from to body component type)
+ (let (from to body component type)
(if header
nil
(and rest (string-match "^[^ ]* +:\\(.*\\)" rest)
(setq from (nth 4 component)
to (cond
((eq (nth 1 component) ?=)
- (irchat-current-nickname))
- ((eq (nth 1 component) ?<)
- (irchat-channel-real (nth 3 component))))
+ (liece-current-nickname))
+ ((or (eq (nth 1 component) ?<)
+ (eq (nth 1 component) ?>))
+ (liece-channel-real (nth 3 component))))
body (concat "(" plum-recent-header " " (car component)
- ") " (nth 5 component))
- fun (llhandler-lookup "irchat-handle-privmsg-msg"))
- (funcall fun from (concat to " :" body))
+ ") " (nth 5 component)))
+ (liece-handle-privmsg-message from (concat to " :" body))
t)
(t nil)))))))
-
(provide 'plum-support)
-;;; plum-support.el ends here.
\ No newline at end of file
+;;; plum-support.el ends here