ejabberd 14: privacy_set in ejabberdctl error when I try to add people to block list....

I am trying to do this to create a blocklist on ejabberd 14

import xmlrpclib

server_url = "http://localhost:4560"
server = xmlrpclib.ServerProxy(server_url)

def ejabberdctl(command, data):
fn = getattr(server, command)
return fn(data)

result = ejabberdctl("privacy_set", {"user":"1", "host":"localhost", "xmlquery":""})

print result

======================

This is what I got from the error log... any one know why?
{xmlrpc_http,171,{ejabberd_xmlrpc,handler,{'EXIT',{badarg,[{erlang,'++',[<<"1">>,[64|<<"localhost">>]],[]},{mod_admin_extra,privacy_set,3,[{file,"src/mod_admin_extra.erl"},{line,1408}]},{ejabberd_xmlrpc,do_command,6,[{file,"src/ejabberd_xmlrpc.erl"},{line,350}]},{ejabberd_xmlrpc,try_do_command,6,[{file,"src/ejabberd_xmlrpc.erl"},{line,313}]},{xmlrpc_http,eval_payload,7,[{file,"src/xmlrpc_http.erl"},{line,166}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}}}}

I check the code..

privacy_set(Username, Host, QueryS) ->
From = jlib:string_to_jid(Username ++ "@" ++ Host), <---- error happen here... why is that?
To = jlib:string_to_jid(Host),
QueryEl = xml_stream:parse_element(QueryS),
StanzaEl = {xmlel, <<"iq">>, [{<<"type">>, <<"set">>}], [QueryEl]},
IQ = jlib:iq_query_info(StanzaEl),
ejabberd_hooks:run_fold(
privacy_iq_set,
Host,
{error, ?ERR_FEATURE_NOT_IMPLEMENTED},
[From, To, IQ]
),
ok.

Syndicate content