summaryrefslogtreecommitdiff
path: root/elisp/erbot/erblog.el
blob: 0e468038d3b00086044e72482d2234ad36fc2eb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
;;; erblog.el --- 
;; Time-stamp: <2007-11-23 11:30:08 deego>
;; Copyright (C) 2002 D. Goel
;; Emacs Lisp Archive entry
;; Filename: erblog.el
;; Package: erblog
;; Author: D. Goel <deego@gnufans.org>
;; Version: 0.0DEV
;; URL:  http://www.emacswiki.org/cgi-bin/wiki.pl?ErBot
 

 
;; This file is NOT (yet) part of GNU Emacs.
 
;; This is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
 
;; This is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING.  If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
 

;; See also:

(defvar erblog-version "0.0dev")

;;==========================================
;;; Code:

(defgroup erblog nil 
  "The group erblog"
   :group 'applications)
(defcustom erblog-before-load-hooks nil "" :group 'erblog)
(defcustom erblog-after-load-hooks nil "" :group 'erblog)
(run-hooks 'erblog-before-load-hooks)


(defvar erblog-active-targets nil
  "This stores the list of targets that have had some activity...

The idea is that the operator sets this to nil (see commands
below).. goes away, comes back and examined this variables to find
out which channels have had activity...
")

(defun erblog-log-target (target &rest stuff)
  (unless (member (format "%s" target)
		  erblog-active-targets)
    (progn
      (add-to-list 'erblog-active-targets
		   (format "%s" target))
      (erblog-show-targets))))
    
;; operator bind to C-c s
(defun erblog-show-targets ()
  (interactive)
  (message "%s" erblog-active-targets))

;; bind to C-c r
(defun erblog-reset-targets ()
  (interactive)
  (message "Nulling.. was %s" erblog-active-targets)
  (setq erblog-active-targets nil))

(provide 'erblog)
(run-hooks 'erblog-after-load-hooks)



;;; erblog.el ends here