[net-nittin-irc-cvs] CVS update: net-nittin-irc/README

Erik Enge eenge at common-lisp.net
Mon Nov 3 22:16:47 UTC 2003


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

Modified Files:
	README 
Log Message:
more info on hooks

Date: Mon Nov  3 17:16:47 2003
Author: eenge

Index: net-nittin-irc/README
diff -u net-nittin-irc/README:1.1 net-nittin-irc/README:1.2
--- net-nittin-irc/README:1.1	Mon Nov  3 12:14:54 2003
+++ net-nittin-irc/README	Mon Nov  3 17:16:47 2003
@@ -7,12 +7,12 @@
 
   * (in-package :irc)
 
-  * (setf connection (connect))
+  * (setf connection (connect :nickname "mynick"
+                              :server "irc.somewhere.org"))
 
   * (read-message-loop connection)
 
-That's it.  Although you might want to check out the connect function
-and its keyword arguments.  Interrupt the read-message-loop and do:
+That's it.  Interrupt the read-message-loop and do:
 
   * (join connection "#lisp")
 
@@ -20,6 +20,16 @@
 command, you need to get back on the feed:
 
   * (read-message-loop connection)
+
+If you need to do something on every join, do:
+
+  * (defun my-hook (message)
+     <do-something>)
+
+  * (add-hook connection 'irc-join-message #'my-hook)
+
+and it will be run next time the library receives an irc-join-message.
+For a full list of messages you can hook into, look at event.lisp.
 
 Erik Enge, erik at nittin.net
 





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