anchor.diff:  %% necessary cleaning up. When it returns, the gen_fsm terminates with
   %% Reason. The return value is ignored.
   %%--------------------------------------------------------------------
  +terminate(Reason, StateName, S = #state{con=P}) when is_pid(P) ->
  +    unlink(P),
  +    irc_connection:close(P),
  +    terminate(Reason, StateName, S#state{con=undefined});
   terminate(_Reason, _StateName, _State) ->
       ok.
   
  
positive.code: %%--------------------------------------------------------------------
  %%% Internal functions
  %%--------------------------------------------------------------------
  
negative.code: connecting(timeout, State = #state{conf=Conf}) ->
      {ok, Pid} = irc_connection:start_link(Conf#conf.host,
                                            Conf#conf.port,
                                            [{sendfn, fun irc_client_fsm_send/2}]),
      {next_state, wait_connected, State#state{con=Pid}}.
  
  wait_connected({irc, Pid, connected}, State = #state{conf=Conf}) ->
  