[net-nittin-irc-cvs] CVS update: net-nittin-irc/example/logger.lisp

Kevin Rosenberg krosenberg at common-lisp.net
Sun Dec 14 04:22:24 UTC 2003


Update of /project/net-nittin-irc/cvsroot/net-nittin-irc/example
In directory common-lisp.net:/tmp/cvs-serv11098

Modified Files:
	logger.lisp 
Log Message:
convert completely to irc-message-event
Date: Sat Dec 13 23:22:24 2003
Author: krosenberg

Index: net-nittin-irc/example/logger.lisp
diff -u net-nittin-irc/example/logger.lisp:1.1 net-nittin-irc/example/logger.lisp:1.2
--- net-nittin-irc/example/logger.lisp:1.1	Sat Dec 13 22:54:12 2003
+++ net-nittin-irc/example/logger.lisp	Sat Dec 13 23:22:24 2003
@@ -1,5 +1,5 @@
 ;;;;  -*- Mode: Lisp -*-
-;;;; $Id: logger.lisp,v 1.1 2003/12/14 03:54:12 krosenberg Exp $
+;;;; $Id: logger.lisp,v 1.2 2003/12/14 04:22:24 krosenberg Exp $
 ;;;;
 ;;;; Purpose: A logging bot 
 ;;;; Author:  Kevin Rosenberg
@@ -64,7 +64,7 @@
 	  text)
   (force-output *output-stream*))
 
-(defun priv-msg-hook (msg)
+(defmethod irc::irc-message-event ((msg irc::irc-privmsg-message))
   (output-event msg
 		(format nil "<~A> ~A" 
 			(source msg)
@@ -101,7 +101,7 @@
 			(source msg)
 			(first (arguments msg)))))
 
-(defun ctcp-action-hook (msg)
+(defmethod irc::irc-message-event ((msg irc::ctcp-action-message))
   (output-event msg
 		(format nil "*~A* ~A" 
 			(source msg)
@@ -145,7 +145,5 @@
 
 
 (defun reset-hooks ()
-  (irc::remove-all-hooks *connection*)
-  (add-hook *connection* 'irc::irc-privmsg-message 'priv-msg-hook)
-  (add-hook *connection* 'irc::ctcp-action-message 'ctcp-action-hook)
-  (add-hook *connection* 'irc::irc-privmsg-message 'msg-hook))
+  (irc::remove-all-hooks *connection*))
+





More information about the Net-nittin-irc-cvs mailing list