anchor.diff:  -export([command/1,command/2]).
   
   
  -
  +%%-------------------------------------------------------------------------
  +%% @spec (State::imapd_fsm()) -> NewState::imapd_fsm()
  +%% @doc  Processes all IMAP commands and checks for extention processing
  +%% @end
  +%%-------------------------------------------------------------------------
   command(#imapd_fsm{line = Line} = State) -> 
  -	io:format("Command Line: ~s~n",[State#imapd_fsm.line]),
  -	command(imapd_util:parse(Line),State).
  -
  +	Command = imapd_util:parse(Line),
  +	io:format("Command: ~p~n",[Command]),
  +	command(Command,State).
  +
  +
  +%%-------------------------------------------------------------------------
  +%% @spec (Comamnd::imap_cmd(),State::imapd_fsm()) -> NewState::imapd_fsm()
  +%% @hidden
  +%% @end
  +%%-------------------------------------------------------------------------
   %%%-------------------------
   %%% CAPABILITY - Any State
   %%%-------------------------
  
positive.code: 	imapd_util:send(#imap_resp{tag = Tag, status = no, info = "Failure: not authenticated"},State),
  	State;
  command(#imap_cmd{tag = Tag, cmd = subscribe = Command, data = MailBoxName},
  	    #imapd_fsm{state = authenticated, user = User} = State) -> 
  	imapd_util:out(Command,MailBoxName,State),
  	Store = gen_store:lookup(mailbox_store, State),
  	case Store:select({MailBoxName,User#user.name}) of
  
negative.code: 	imapd_util:send(#imap_resp{tag = Tag, status = no},State),
  	State;
  command(#imap_cmd{tag = Tag, cmd = status = Command, data = {MailBoxName,Flags}},
  		#imapd_fsm{state = FSMState, user = User} = State) when FSMState =:= authenticated; FSMState =:= selected -> 
  	imapd_util:out(Command,MailBoxName,State),
  	Store = gen_store:lookup(mailbox_store, State),
  	case Store:select({string:strip(MailBoxName),User#user.name}) of
  