anchor.diff:                                {command, Command},
                                 {text, Text}]}
       end.
  -
  -
  -%%--------------------------------------------------------------------
  -parse_notice(Cmd, [Target, Text]) ->
  -    Cmd#irc_cmd{args = [{text, Text}], target=Target};
  -parse_notice(Cmd, [Target | Text]) ->
  -    Cmd#irc_cmd{target = string:strip(Target, right, $\s),
  -                args = [{text, irc_parser:join($:, Text)}]}.
   
   %%--------------------------------------------------------------------
   parse_server(Cmd, Args) when is_list(Args) ->
  
positive.code: parse_args(PingPong, [$:|Token], Cmd) when PingPong == ping; PingPong == pong ->
      Cmd#irc_cmd{args=[{token , Token}]};
  
  parse_args(privmsg, Args, Cmd) ->
      {Target, Msg} = irc_parser:split($:, Args),
      parse_privmsg(Cmd#irc_cmd{target=string:strip(Target, right, $\s)},
                    Msg);
  
  parse_args(join, [$:|Chans], Cmd) ->
      Cmd#irc_cmd{args=[{channels, string:tokens(Chans, ",")}]};
  
  parse_args(notopic, Args, Cmd) ->
      Cmd;
  parse_args(topic, [$:|Topic], Cmd) ->
      Cmd#irc_cmd{args=[{topic, Topic}]};
  
  parse_args(namreply, Arg, Cmd) ->
      {NickChan, MemberStr} = irc_parser:split($:, Arg),
      {Nick, Chan} = irc_parser:split($=, NickChan),
      Members = string:tokens(MemberStr, " "),
      Cmd#irc_cmd{args=[{channel, Chan},
                        {members, Members}]};
  
  parse_args(endofnames, Arg, Cmd) ->
      {Chan, Message} = irc_parser:split($:, Arg),
  
negative.code:     Cmd#irc_cmd{target=Target,
                  args=[{message, Msg}]}.
  
  %%--------------------------------------------------------------------
  
  parse_nick([$@|Nick]) ->
      {op, Nick};
  parse_nick([$+|Nick]) ->
      {voice, Nick};
  parse_nick(Nick) ->
      {user, Nick}.
  
  parse_chantype("@") -> secret;
  parse_chantype("*") -> private;
  parse_chantype("=") -> public;
  parse_chantype(T) -> throw({unknown_chantype, T}).
  
  %%--------------------------------------------------------------------
  
  parse_notice_or_privmsg(Cmd, Msg) ->
      case lists:member(1, Msg) of
          true -> parse_ctcp_msg(Cmd, Msg);
          false -> Cmd#irc_cmd{args=[{message, Msg}]}
  