Author: ehuelsmann Date: Sun Apr 22 16:01:44 2007 New Revision: 190
Modified: trunk/parse-message.lisp Log: Other DCC protocols starting with an #\S have been introduced now (SCHAT,SSEND).
Modified: trunk/parse-message.lisp ============================================================================== --- trunk/parse-message.lisp (original) +++ trunk/parse-message.lisp Sun Apr 22 16:01:44 2007 @@ -118,17 +118,21 @@ type) type nil)) - + (defun dcc-type-p (string type) "Is the `string' actually a representation of the DCC `type'?" - (case type - (:dcc-chat-request - (when (string-equal (char string 5) #\C) - :dcc-chat-request)) - (:dcc-send-request - (when (string-equal (char string 5) #\S) - :dcc-send-request)) - (otherwise nil))) + (let* ((args (tokenize-string (string-trim (list +soh+) string))) + (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)))))
(defun ctcp-message-type (string) "If `string' is a CTCP message, return the type of the message or