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

Andreas Fuchs afuchs at common-lisp.net
Sun Sep 25 18:19:29 UTC 2005


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

Modified Files:
	message-display.lisp receivers.lisp 
Log Message:

 * handle "you need channel operator status" message right.
 * fix intern-receiver: should always use the normalized-name

Date: Sun Sep 25 20:19:28 2005
Author: afuchs

Index: beirc/message-display.lisp
diff -u beirc/message-display.lisp:1.16 beirc/message-display.lisp:1.17
--- beirc/message-display.lisp:1.16	Sun Sep 25 19:55:26 2005
+++ beirc/message-display.lisp	Sun Sep 25 20:19:28 2005
@@ -190,6 +190,12 @@
 
 ;;; channel management messages
 
+(defmethod print-message ((message irc:irc-err_chanoprivsneeded-message) receiver)
+  (formatting-message (t message receiver)
+          ((format t "    "))
+          ((with-drawing-options (*standard-output* :ink +gray33+ :text-size :small)
+             (format-message* (format nil "Not permitted: ~A" (irc:trailing-argument message)))))))
+
 (defun print-topic (receiver message sender channel topic)
   (formatting-message (t message receiver)
           ((format t "    "))


Index: beirc/receivers.lisp
diff -u beirc/receivers.lisp:1.2 beirc/receivers.lisp:1.3
--- beirc/receivers.lisp:1.2	Sun Sep 25 19:51:34 2005
+++ beirc/receivers.lisp	Sun Sep 25 20:19:28 2005
@@ -72,7 +72,7 @@
                                               :display-time nil
                                               :width 400 :height 600
                                               :incremental-redisplay t)))
-            (setf (gethash name (receivers frame)) receiver)
+            (setf (gethash normalized-name (receivers frame)) receiver)
             receiver)))))
 
 (defun remove-receiver (receiver frame)
@@ -138,7 +138,7 @@
                                            (intern-receiver target frame :channel target))))))))
   (define-nth-arg-message-receiver-lookup
       (0 irc:irc-topic-message irc:irc-kick-message)
-      (1 irc:irc-rpl_topic-message)
+      (1 irc:irc-rpl_topic-message irc:irc-err_chanoprivsneeded-message)
       (2 irc:irc-rpl_namreply-message)
       (nil irc:irc-join-message)))
 
@@ -181,7 +181,11 @@
     cl-irc:irc-rpl_endofexceptlist-message
     cl-irc:irc-ping-message))
 
+
+;;; default receiver.
 (defmethod receiver-for-message ((message irc:irc-message) frame)
+  #+or                    ; comment out to debug on uncaught messages.
+  (break)                   
   (server-receiver frame))
 
 ;; TODO: more receiver-for-message methods.




More information about the Beirc-cvs mailing list