Changeset 190 for trunk


Ignore:
Timestamp:
04/22/07 20:01:44 (18 years ago)
Author:
Erik Huelsmann
Message:

Other DCC protocols starting with an #\S have been introduced now (SCHAT,SSEND).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/parse-message.lisp ΒΆ

    r160 r190  
    119119      type
    120120      nil))
    121                                                        
     121
    122122(defun dcc-type-p (string type)
    123123  "Is the `string' actually a representation of the DCC `type'?"
    124   (case type
    125     (:dcc-chat-request
    126      (when (string-equal (char string 5) #\C)
    127        :dcc-chat-request))
    128     (:dcc-send-request
    129      (when (string-equal (char string 5) #\S)
    130        :dcc-send-request))
    131     (otherwise nil)))
     124  (let* ((args (tokenize-string (string-trim (list +soh+) string)))
     125         (dcc (string-upcase (first args)))
     126         (type (string-upcase (second args))))
     127    (when (string= dcc "DCC")
     128      (case type
     129        (:dcc-chat-request
     130         (when (string= type "CHAT")
     131           :dcc-chat-request))
     132        (:dcc-send-request
     133         (when (string= type "SEND")
     134           :dcc-send-request))
     135        (otherwise nil)))))
    132136
    133137(defun ctcp-message-type (string)
Note: See TracChangeset for help on using the changeset viewer.