anchor.diff:          channel_sup = ChanSup,
           tcp_socket = Socket}}.
   
  +
   handle_call(get_name, _From, State) ->
       {reply, State#state.server_name, State};
   handle_call(get_nick, _From, State) ->
  
positive.code: handle_call({get_channel, ChanName}, _From, State) ->
      {reply, channel_sup:get_channel(State#state.channel_sup, ChanName), State}.
  
  handle_cast({join_channel, ChanName}, State) ->
      log:info("joining ~p on ~p", [ChanName, State#state.server_name]),
      channel_sup:start_channel(State#state.channel_sup, {self(), ChanName}),
      {noreply, State};
  handle_cast({part_channel, ChanName}, State) ->
      channel_sup:kill_channel(State#state.channel_sup, ChanName),
      log:info("left ~p on ~p", [ChanName, State#state.server_name]),
      {noreply, State};
  handle_cast({set_nick, Nickname}, State) ->
      send_data(self(), {nick, Nickname}),
      {noreply, State#state{nick = Nickname}};
  handle_cast({send, {Type, Params}}, State) ->
      log:debug("<< ~p", [{Type, Params}]),
      List = irc:format(Type, Params),
      gen_tcp:send(State#state.tcp_socket, List ++ "\r\n"),
      {noreply, State}.
  
  handle_info({tcp, _Socket, List}, State) ->
      Data = irc:parse(re:replace(List, "(\r\n)*", "", [global, {return, list}])),
  
negative.code:     case Data of
          {ping, Server} ->
              send_data(self(), {ping, Server});
          %% handle receiving private messages
          {privmsg, {Nick, Msg}} ->
              PMChan = channel_sup:get_channel(State#state.channel_sup, Nick),
              channel:receive_message(PMChan, {privmsg_addressed, Msg});
          {privmsg, {Channel, Msg}} ->
              case channel_sup:get_channel(State#state.channel_sup, Channel) of
                  error ->
  