[cl-irc-cvs] r191 - trunk

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Sun Apr 22 21:05:12 UTC 2007


Author: ehuelsmann
Date: Sun Apr 22 17:05:11 2007
New Revision: 191

Modified:
   trunk/parse-message.lisp
Log:
Add a list of DCC session types.

Modified: trunk/parse-message.lisp
==============================================================================
--- trunk/parse-message.lisp	(original)
+++ trunk/parse-message.lisp	Sun Apr 22 17:05:11 2007
@@ -125,14 +125,38 @@
          (dcc (string-upcase (first args)))
          (type (string-upcase (second args))))
     (when (string= dcc "DCC")
-      (case type
-        (:dcc-chat-request
-         (when (string= type "CHAT")
-           :dcc-chat-request))
-        (:dcc-send-request
-         (when (string= type "SEND")
-           :dcc-send-request))
-        (otherwise nil)))))
+      (let ((r
+             ;; the list below was found on Wikipedia and in kvirc docs
+             (second (assoc type '(("CHAT" :dcc-chat-request)
+                                   ("SEND" :dcc-send-request)
+                                   ("XMIT" :dcc-xmit-request)
+                                   ("SCHAT" :dcc-schat-request)
+                                   ("SSEND" :dcc-ssend-request)
+                                   ("REVERSE" :dcc-reverse-request)
+                                   ("RSEND" :dcc-rsend-request)
+                                   ("TSEND" :dcc-tsend-request)
+                                   ("STSEND" :dcc-stsend-request)
+                                   ("TSSEND" :dcc-stsend-request)
+                                   ("RESUME" :dcc-resume-request)
+                                   ("ACCEPT" :dcc-accept-request)
+                                   ;; GET
+                                   ;; TGET
+                                   ;; STGET
+                                   ;; TSGET
+                                   ;; RECV
+                                   ;; SRECV
+                                   ;; TRECV
+                                   ;; STRECV
+                                   ;; TSRECV
+                                   ;; RSEND
+                                   ;; SRSEND
+                                   ;; TRSEND
+                                   ;; STRSEND
+                                   ;; TSRSEND
+                                   ;; VOICE
+                                   ) :test #'string=))))
+        (when (eq r type)
+          type)))))
 
 (defun ctcp-message-type (string)
   "If `string' is a CTCP message, return the type of the message or



More information about the cl-irc-cvs mailing list