anchor.diff:              unauthorized
       end.
       
  -bind(SJID, Password, IP) ->
  +bind(SJID, Password, IP, Data) ->
       #jid{user = User, server = Server, resource = Resource} = jlib:string_to_jid(SJID),
  +    
  +    Lang        = default_value( lang,         Data, ?LANG         ),
  +    Wait        = default_value( wait,         Data, ?WAIT         ),
  +    Hold        = default_value( hold,         Data, ?HOLD         ),
  +    Window      = default_value( window,       Data, ?WINDOW       ),
  +    Content     = default_value( content,      Data, ?CONTENT      ),
  +    Ver         = default_value( ver,          Data, ?VER          ),
  +    XMPPVersion = default_value( xmpp_version, Data, ?XMPP_VERSION ),
  +    
       RidSessionCreate  = list_to_integer(randoms:get_string()),
       RidAuth           = RidSessionCreate  + 1,
       RidSessionRestart = RidAuth           + 1,
  
positive.code:             false
      end.
      
  process_request(Request, IP) ->
      {_, _, Response} = ejabberd_http_bind:process_request(Request, IP),
      xml_stream:parse_element(lists:flatten(Response)).
  
negative.code: -include("ejabberd.hrl").
  -include("jlib.hrl").
  -include("ejabberd_http.hrl").
  
  -define(LANG,         "en").
  -define(WAIT,         "60").
  -define(HOLD,         "1").
  -define(WINDOW,       "5").
  -define(CONTENT,      "text/xml; charset=utf-8").
  -define(VER,          "1.6").
  -define(XMPP_VERSION, "1.0").
  
  -record(binding, {jid, sid, rid}).
  
  