From b868fd4f470c949448fe58707df34b2fdbf6ca4b Mon Sep 17 00:00:00 2001 From: bg66 Date: Sun, 1 Sep 2002 15:47:49 +0000 Subject: [PATCH] * contrib/plum-support.el: Follow the current version of Liece. --- contrib/plum-support.el | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/contrib/plum-support.el b/contrib/plum-support.el index 9697fbc..6c16db3 100644 --- a/contrib/plum-support.el +++ b/contrib/plum-support.el @@ -1,13 +1,12 @@ ;;; plum-support.el --- pirc support for plum ;; Copyright (C) 1999 Daiki Ueno -;; See file irchat-copyright.el for original change log and copyright info. -;; Author: Daiki Ueno +;; Author: Daiki Ueno ;; 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 @@ -24,14 +23,20 @@ ;; 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") @@ -112,15 +117,15 @@ (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) @@ -134,17 +139,16 @@ (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 -- 1.7.10.4