anchor.diff:  %% gen_fsm:sync_send_all_state_event/2,3, this function is called to handle
   %% the event.
   %%--------------------------------------------------------------------
  +handle_sync_event(channels, _From, StateName, S = #state{channels=C}) ->
  +    {reply, {ok, C}, StateName, S};
  +handle_sync_event(nick, _From, StateName, S = #state{nick=N}) ->
  +    {reply, {ok, N}, StateName, S};
   handle_sync_event(shutdown, _From, _StateName, S = #state{con=P}) when is_pid(P) ->
       unlink(P),
       irc_connection:close(P),
  -    {stop, normal, ok, S#state{con=undefined}};
  +    {stop, shutdown, ok, S#state{con=undefined}};
   handle_sync_event(shutdown, _From, _StateName, S) ->
  -    {stop, normal, ok, S};
  +    {stop, shutdown, ok, S};
   handle_sync_event(Event, _From, StateName, State) ->
       ?WARN("Unexpected event ~p in state ~p", [Event, StateName]),
       {next_state, StateName, State}.
  
positive.code:                           Chans),
      ?INFO("Joining: ~s~nMembers: ~p", [ChanName,
                                         lists:usort([Members|Chan#chan.members])]),
      {next_state, joining_channel, State#state{channels=NewChans}};
  joining_channel(E = {irc, _Pid, C}, State) ->
      ?INFO("Unknown message in join state, retreating to connected state.~n~p",
  
negative.code: 
  %% API
  -export([start_link/2,
           start_link/3,
           start_link/6,
           shutdown/1,
           send/2,
           reset_to_connected/1,
           nick/1,
           channels/1
          ]).
  
  -export([connecting/2,
           wait_connected/2,
  