anchor.diff:    (format t "Parsing 372 command~%")
     (format t "MOTD: ~A~%" trailing))
   
  -;;FIXME: this is called every time somebody join
   (defparser "JOIN"
  -  (when (and (member middle *channels* :test #'equal)
  -             (equal *nick* (subseq prefix 1 (position #\! prefix))))
  -    (format t "Joined ~A~%" middle)
  -    (say middle *channel-join-msg*)))
  +  (let ((channel (subseq middle 1 (length middle)))
  +        (nick (subseq prefix 1 (position #\! prefix))))
  +    (when (equal *nick* nick)
  +      (format t "I have joined ~A~%" middle)
  +      (say channel *channel-join-msg*))))
   
   ;;parse an irc string into its three
   ;;parts
   (defun parse-irc (string)
     ;;prefix(optional) command middle trailing(optional)
  -  (let ((splited-msg (split-string *reply* #\Space)))
  -    (if (equal (char (first splited-msg) 0) #\:);try to find a prefix
  -        (setq prefix (first splited-msg)))
  -    (setq command (second splited-msg))         ;then the command
  -    (setq middle (third splited-msg))           ;then middle
  -    (setq trailing (cdddr splited-msg))         ;and the trailing part
  -    (setq nick (subseq prefix 1
  -                       (position #\! prefix)))  ;nick who send the message
  +  (let* ((splited-msg (split-string *reply* #\Space))
  +         (prefix (when (equal (char (first splited-msg) 0) #\:)
  +                   (first splited-msg)))
  +         (command (second splited-msg))
  +         (middle (third splited-msg))
  +         (trailing (cdddr splited-msg))
  +         (nick (when prefix
  +                 (subseq prefix 1
  +                         (position #\! prefix)))))
       (format t "Prefix:~S~%" prefix)
       (format t "Command:~S~%" command)
       (format t "Middle:~S~%" middle)
  
positive.code: ;;;;;;;;;;;;;;;;;;;;;;
  ;;Lotzo bot framework
  ;;;;;;;;;;;;;;;;;;;;;;
  
  ;;TODO: improve module system so we can load, unload and reload modules
  ;;TODO: maybe remove the package stuff for modules
  ;;TODO: change modules spec to allow init and shutdown of modules
  ;;TODO: at specific time
  ;;TODO: change the rc-file stuff
  (in-package :lotzo)
  
  
  
negative.code: (defvar *rc-file* "~/.lotzorc")
  
  (defvar *channels* '("#lotzo"))
  (defvar *servers* '("irc.freenode.net"))
  (defvar *port* 6667)
  (defvar *nick* "LotzoBeta")
  
  (defvar *channel-join-msg* "Hello")
  
  