anchor.diff:  %% the current state name StateName is called to handle the event. It is also 
   %% called if a timeout occurs. 
   %%--------------------------------------------------------------------
  -connecting({irc, IrcConnection, connected}, State) ->
  +connecting({irc, IrcConnection, connected}, State = #state{user=User}) ->
       erlang:link(IrcConnection),
  -    {next_state, login_pass, State#state{con=IrcConnection}};
  +    {ok, {Address, _Port}} = irc_connection:peername(IrcConnection),
  +    {next_state, login_pass, State#state{con=IrcConnection,user=User#user{host=Address}}};
   connecting(Msg, State) ->
       {stop, {unexpected, Msg}, State}.
   
  
positive.code:            State = #state{user=U}) ->
      UserName = proplists:get_value(user_name, Args),
      RealName = proplists:get_value(real_name, Args),
      {next_state, login, State#state{user=U#user{name=UserName,
                                                  realname=RealName}}};
  login_user(Cmd = {irc, _, _}, State) ->
      ?INFO("Got ~p in state login_user", [Cmd]),
      csend(State, notregistered),
      {next_state, login_user, State}.
  
  login(Event, State) ->
      ?INFO("Got ~p in state login.", [Event]),
      {next_state, login, State}.
  
  %%--------------------------------------------------------------------
  %% Function:
  
negative.code: init(Options) ->
      Server = proplists:get_value(server, Options),
      Mod = proplists:get_value(mod, Options, gen_irc_server),
      IrcServer = #irc_server{host=proplists:get_value(host, Options, "unknown")},
      init(Mod, Server, proplists:get_value(socket, Options, false),
           #state{irc_server=IrcServer}).
  
  init(Mod, Server, true, State) ->
      {ok, connecting, State#state{server=Server, server_mod=Mod}}.
  
  %%--------------------------------------------------------------------
  %% Function: 
  