[beirc-cvs] CVS update: beirc/application.lisp
Max-Gerd Retzlaff
mretzlaff at common-lisp.net
Fri Oct 7 00:59:58 UTC 2005
Update of /project/beirc/cvsroot/beirc
In directory common-lisp.net:/tmp/cvs-serv21581
Modified Files:
application.lisp
Log Message:
Adds COM-LOAD to load lisp files from within beirc. For example to load
a CL-IRC hook like http://bl0rg.net/~mgr/flux/bl0rg-hook.lisp (or slightly
more useful things).
Date: Fri Oct 7 02:59:58 2005
Author: mretzlaff
Index: beirc/application.lisp
diff -u beirc/application.lisp:1.33 beirc/application.lisp:1.34
--- beirc/application.lisp:1.33 Fri Oct 7 02:03:15 2005
+++ beirc/application.lisp Fri Oct 7 02:59:58 2005
@@ -371,6 +371,17 @@
(when (eql status :external)
(apply symbol (current-connection *application-frame*) (coerce args 'list)))))
+(define-beirc-command (com-load :name t)
+ ((pathname 'pathname :prompt "pathname")
+ &key
+ (remove-type-if-is-lisp-p 'boolean :default t))
+ (when (probe-file pathname)
+ (load (if (and remove-type-if-is-lisp-p
+ (string-equal (pathname-type pathname)
+ "lisp"))
+ (make-pathname :type nil :defaults pathname)
+ pathname))))
+
(defun make-fake-irc-message (message-type &key command arguments
(source (slot-value *application-frame* 'nick))
trailing-argument)
More information about the Beirc-cvs
mailing list