anchor.diff:          (t (error "Not connected."))))
   
   (define-command chan (irc text)
  +  "CHAN <channel>
  +  Switch to a channel you are joined to."
     (when (irc-connection irc)
       (if (find text (joined-channels irc) :test 'string-equal)
           (setf (current-channel irc) text)
           (error "Not joined to channel ~A." text))))
   
   (define-command part (irc text)
  +  "PART [message]
  +  Leave the current channel."
     (when (and (irc-connection irc) (current-channel irc))
       (buffered-format (irc-connection irc) "PART ~A :~A~%" (current-channel irc) text)
       (setf (joined-channels irc) (remove (current-channel irc) (joined-channels irc)))
       (setf (current-channel irc) (first (joined-channels irc)))))
  +
  +(define-command help (irc text)
  +  "HELP
  +  Show help on commands."
  +  (format (display-pane irc) "~&Available commands:")
  +  (maphash (lambda (name help)
  +             (declare (ignore name))
  +             (format (display-pane irc) "~&/~:(~A~)" help))
  +           *top-level-command-doc*)
  +  (format (display-pane irc) "~&To connect, first set your nickname with the NICK command, then connect to a server with CONNECT."))
   
   (defclass irc-client ()
     ((%fifo :initarg :fifo :reader fifo)
  
positive.code:              (buffered-format (irc-connection irc) "USER ~A hostname servername :~A~%" (nickname irc) (nickname irc))
               (buffered-format (irc-connection irc) "NICK ~A~%" (nickname irc))))))
  
  (define-command join (irc text)
    (cond ((find text (joined-channels irc) :test 'string-equal)
           (error "Already joined to channel ~A." text))
          ((irc-connection irc)
  
negative.code:   (let ((known (assoc name *known-servers* :key 'symbol-name :test 'string-equal)))
      (cond (known
             (values (second known) (third known)))
            (t
             (let* ((colon (position #\: name))
                    (server (if colon
                                (subseq name 0 colon)
                                name))
                    (port (if (and colon (not (eql (1+ colon) (length name))))
                              (parse-integer name :start (1+ colon))
                              6667)))
               (values server port))))))
  
  (defclass server-disconnect-event ()
    ())
  