[beirc-cvs] CVS update: beirc/beirc.lisp beirc/message-display.lisp

Andreas Fuchs afuchs at common-lisp.net
Sat Sep 24 14:36:35 UTC 2005


Update of /project/beirc/cvsroot/beirc
In directory common-lisp.net:/tmp/cvs-serv31756

Modified Files:
	beirc.lisp message-display.lisp 
Log Message:
Handle printing of the server's MOTD. Add an /Eval command to debug
cl-irc commands.


Date: Sat Sep 24 16:36:32 2005
Author: afuchs

Index: beirc/beirc.lisp
diff -u beirc/beirc.lisp:1.20 beirc/beirc.lisp:1.21
--- beirc/beirc.lisp:1.20	Sat Sep 24 13:43:37 2005
+++ beirc/beirc.lisp	Sat Sep 24 16:36:31 2005
@@ -461,6 +461,12 @@
   (setf (current-focused-nicks)
         (remove who (current-focused-nicks) :test #'string=)))
 
+(define-beirc-command (com-eval :name t) ((command 'string :prompt "command")
+                                          (args '(sequence string) :prompt "arguments"))
+  (multiple-value-bind (symbol status) (find-symbol command :irc)
+    (when (eql status :external)
+      (apply symbol (current-connection *application-frame*) (coerce args 'list)))))
+
 (define-beirc-command (com-quit :name t) ((reason 'mumble :prompt "reason"))
   (when (current-connection *application-frame*)
     (quit *application-frame* reason))


Index: beirc/message-display.lisp
diff -u beirc/message-display.lisp:1.7 beirc/message-display.lisp:1.8
--- beirc/message-display.lisp:1.7	Sat Sep 24 11:14:03 2005
+++ beirc/message-display.lisp	Sat Sep 24 16:36:31 2005
@@ -205,6 +205,12 @@
              (present (irc:source message) 'nickname)
              (format t " left ~A: ~A" (first (irc:arguments message)) (irc:trailing-argument message))))))
 
+(defmethod print-message ((message irc:irc-rpl_motd-message) receiver)
+  (formatting-message (t message receiver)
+          ((format t "~A" (irc:source message)))
+          ((with-drawing-options (*standard-output* :ink +gray33+ :text-size :small)
+             (format t "MOTD: ~A" (irc:trailing-argument message))))))
+
 (defmethod print-message (message receiver)
   (formatting-message (t message receiver)
           ((format t "!!! ~A" (irc:source message)))




More information about the Beirc-cvs mailing list