[cl-irc-cvs] CVS cl-irc

ehuelsmann ehuelsmann at common-lisp.net
Tue Feb 14 21:51:21 UTC 2006


Update of /project/cl-irc/cvsroot/cl-irc
In directory common-lisp:/tmp/cvs-serv19293

Modified Files:
	command.lisp 
Log Message:
Add support for joining password-protected channels. Patch by Andreas Fuchs.

--- /project/cl-irc/cvsroot/cl-irc/command.lisp	2006/01/25 20:03:27	1.14
+++ /project/cl-irc/cvsroot/cl-irc/command.lisp	2006/02/14 21:51:21	1.15
@@ -1,4 +1,4 @@
-;;;; $Id: command.lisp,v 1.14 2006/01/25 20:03:27 ehuelsmann Exp $
+;;;; $Id: command.lisp,v 1.15 2006/02/14 21:51:21 ehuelsmann Exp $
 ;;;; $Source: /project/cl-irc/cvsroot/cl-irc/command.lisp,v $
 
 ;;;; See LICENSE for licensing information.
@@ -19,7 +19,7 @@
 (defgeneric service (connection nickname distribution info))
 (defgeneric quit (connection &optional message))
 (defgeneric squit (connection server comment))
-(defgeneric join (connection channel))
+(defgeneric join (connection channel &key password))
 (defgeneric multi-join (connection channels))
 (defgeneric part (connection channel))
 (defgeneric part-all (connection))
@@ -147,11 +147,11 @@
 (defmethod squit ((connection connection) (server string) (comment string))
   (send-irc-message connection :squit comment server))
 
-(defmethod join ((connection connection) (channel string))
-  (send-irc-message connection :join nil channel))
+(defmethod join ((connection connection) (channel string) &key password)
+  (apply #'send-irc-message connection :join nil channel (when password (list password))))
 
-(defmethod join ((connection connection) (channel channel))
-  (join connection (name channel)))
+(defmethod join ((connection connection) (channel channel) &key password)
+  (join connection (name channel) :password password))
 
 ;; utility function not part of the RFC
 (defmethod multi-join ((connection connection) (channels list))




More information about the cl-irc-cvs mailing list