anchor.diff:  start_vhs(Host, [{_VHost, _Opts}| Tail]) ->
       ?DEBUG("start_vhs ~p  ~p~n", [Host, [{_VHost, _Opts}| Tail]]),
       start_vhs(Host, Tail).
  +
  +%%
  +%% Start VHost
  +%%
   start_vh(Host, Opts) ->
       Url = gen_mod:get_opt(path, Opts, ?DEFAULT_URL),
       ejabberd_hooks:add(user_send_packet, Host, ?MODULE, log_packet_send, 55),
  -    ejabberd_hooks:add(user_receive_packet, Host, ?MODULE, log_packet_receive, 55),
  +    ejabberd_hooks:add(user_receive_packet, Host, ?MODULE,
  +                       log_packet_receive, 55),
       register(gen_mod:get_module_proc(Host, ?PROCNAME),
  -         spawn(?MODULE, init, [#config{url=Url}])).
  +    spawn(?MODULE, init, [#config{url=Url}])).
   
  +%%
  +%% Init
  +%%
   init(Config)->
       ?DEBUG("Starting ~p with config ~p~n", [?MODULE, Config]),
       loop(Config).
   
  +
  +%%
  +%% Loop
  +%%
   loop(Config) ->
       receive
  -    {call, Caller, get_config} ->
  -        Caller ! {config, Config},
  -        loop(Config);
  -    stop ->
  -        exit(normal)
  +        {call, Caller, get_config} ->
  +            Caller ! {config, Config},
  +            loop(Config);
  +        stop ->
  +            exit(normal)
       end.
   
  +%%
  +%% Stop
  +%%
   stop(Host) ->
       ejabberd_hooks:delete(user_send_packet, Host,
  -              ?MODULE, log_packet_send, 55),
  +                          ?MODULE, log_packet_send, 55),
       ejabberd_hooks:delete(user_receive_packet, Host,
  -              ?MODULE, log_packet_receive, 55),
  +                          ?MODULE, log_packet_receive, 55),
       gen_mod:get_module_proc(Host, ?PROCNAME) ! stop,
       ok.
   
  +%%
  +%% Log Packet Send
  +%%
   log_packet_send(From, To, Packet) ->
       log_packet(From, To, Packet, From#jid.lserver).
   
  -log_packet_receive(_JID, From, To, _Packet) when From#jid.lserver == To#jid.lserver->
  +%%
  +%% Log Packet Receive
  +%%
  +log_packet_receive(_JID, From, To, _Packet)
  +        when From#jid.lserver == To#jid.lserver->
       ok; % only log at send time if the message is local to the server
   log_packet_receive(_JID, From, To, Packet) ->
       log_packet(From, To, Packet, To#jid.lserver).
   
  +%%
  +%% Log Packet
  +%%
   log_packet(From, To, Packet = {xmlelement, "message", Attrs, _Els}, Host) ->
       case xml:get_attr_s("type", Attrs) of
  -    "groupchat" -> %% mod_muc_log already does it
  -        ?DEBUG("dropping groupchat: ~s", [xml:element_to_string(Packet)]),
  -        ok;
  -    "error" -> %% we don't log errors
  -        ?DEBUG("dropping error: ~s", [xml:element_to_string(Packet)]),
  -        ok;
  -    _ ->
  -        write_packet(From, To, Packet, Host)
  +        "groupchat" -> %% mod_muc_log already does it
  +            ?DEBUG("dropping groupchat: ~s", [xml:element_to_string(Packet)]),
  +            ok;
  +        "error" -> %% we don't log errors
  +            ?DEBUG("dropping error: ~s", [xml:element_to_string(Packet)]),
  +            ok;
  +        _ ->
  +            write_packet(From, To, Packet, Host)
       end;
   log_packet(_From, _To, _Packet, _Host) ->
       ok.
   
  +%%
  +%% Write Packet
  +%%
   write_packet(From, To, Packet, Host) ->
       gen_mod:get_module_proc(Host, ?PROCNAME) ! {call, self(), get_config},
  -    Config = receive
  -           {config, Result} ->
  -           Result
  -       end,
  -    {Subject, Body} =
  -    {
  +    Config =
  +        receive
  +            {config, Result} ->
  +                Result
  +        end,
  +    {Subject, Body} = {
           case xml:get_path_s(Packet, [{elem, "subject"}, cdata]) of
               false ->
                   "";
  
positive.code: 
  -record(config, {url=?DEFAULT_URL}).
  
  start(Host, Opts) ->
      ?DEBUG(" ~p  ~p~n", [Host, Opts]),
      case gen_mod:get_opt(host_config, Opts, []) of
      [] ->
          start_vh(Host, Opts);
      HostConfig ->
          start_vhs(Host, HostConfig)
      end.
  
  start_vhs(_, []) ->
      ok;
  start_vhs(Host, [{Host, Opts}| Tail]) ->
  
negative.code:     },
      case Subject ++ Body of
          "" -> %% don't log empty messages
              ?DEBUG("not logging empty message from ~s",
                     [jlib:jid_to_string(From)]),
              ok;
          _ ->
              Url = Config#config.url,
              FromJid = From#jid.luser++"@"++From#jid.lserver,
              ToJid = To#jid.luser++"@"++To#jid.lserver,
              MessageText =
                  case Subject of
                      "" ->
                          Body;
                      _ ->
                          Subject ++ Body
                  end,
      end.
  
  %%
  %% Return the number of occurence of Word in String
  %%
  count(String, Word) ->
      case string:str(String, Word) of
      0 ->
  