[beirc-cvs] CVS update: beirc/presentations.lisp
Andreas Fuchs
afuchs at common-lisp.net
Sat Oct 1 18:18:51 UTC 2005
Update of /project/beirc/cvsroot/beirc
In directory common-lisp.net:/tmp/cvs-serv9128
Modified Files:
presentations.lisp
Log Message:
add a few more checks for channel-name-ness, inspired by rfcs 2811 and 2813
Date: Sat Oct 1 20:18:50 2005
Author: afuchs
Index: beirc/presentations.lisp
diff -u beirc/presentations.lisp:1.6 beirc/presentations.lisp:1.7
--- beirc/presentations.lisp:1.6 Fri Sep 30 15:30:36 2005
+++ beirc/presentations.lisp Sat Oct 1 20:18:50 2005
@@ -116,7 +116,18 @@
(defun channelp (channel)
(and (stringp channel)
(> (length channel) 2)
- (not (null (member (char channel 0) '(#\# #\+ #\! #\&))))))
+ (< (length channel) 50)
+ (member (char channel 0) '(#\# #\+ #\! #\&))
+ (not (find-if (lambda (c)
+ (member c `(#\Space
+ #\, ,(code-char 7)
+ ;; XXX: #\: is used to separate the
+ ;; channel name from the channel
+ ;; mask, and so isn't a part of the
+ ;; channel name. see rfc2811 for
+ ;; details.
+ #\:)))
+ channel))))
(define-presentation-method accept ((type channel) *standard-input* (view textual-view) &key)
(let ((channel (accept 'string :view view :prompt nil)))
More information about the Beirc-cvs
mailing list