anchor.diff:      {noreply, State};
               
   handle_info(Msg, State) ->
  -    io:format("RCV: ~p~n",[Msg]),
  +    io:format("UNHANDLED RCV: ~p~n",[Msg]),
       {noreply, State}.
   
   terminate(_Reason, _State) ->
  
positive.code:     exmpp_session:send_packet(State#state.session, Presence1),
      {noreply, State}.
  
  handle_info(Rec = #received_packet{packet_type=presence, from=From, raw_packet=Packet}, State) ->
      case Rec#received_packet.type_attr of
          "unavailable" ->
              io:format("OFFLINE ~p~n",[From]);
          "available" -> 
              io:format("ONLINE ~p~n",[From]);
          X ->
              io:format("UNKNOWN PRESENCE ~p ~p~n",[X, From])
      end,
      {noreply, State};
              
  handle_info(Record = #received_packet{packet_type=message, raw_packet=Packet}, State) ->
      case exmpp_message:get_body(Packet) of
          undefined -> foo;
          Body -> io:format("RCV Chat msg body: ~p~n", [Body]),
  
negative.code:     TmpPacket2 = exmpp_xml:set_attribute(TmpPacket, to, From),
      NewPacket = exmpp_xml:remove_attribute(TmpPacket2, id),
      exmpp_session:send_packet(MySession, NewPacket).
  
  
  playdar_capable({_User, _Domain, Resource} = _Jid) ->
  	R = binary_to_list(Resource),
  	string:str(R, "playdar") /= 0.