diff options
author | Pouriya <pouriya.jahanbakhsh@gmail.com> | 2022-01-21 03:14:28 +0330 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-21 03:14:28 +0330 |
commit | 03485f5e940326a9fdbcf2ecd1918b2772003a6a (patch) | |
tree | 5ce253cdd24e11f0f2bd90babbbf0bc38e38c575 /src/ejabberd_ctl.erl | |
parent | Merge branch 'processone:master' into master (diff) | |
parent | mod_pubsub: Allow for limiting item_expire value (diff) |
Merge branch 'processone:master' into master
Diffstat (limited to 'src/ejabberd_ctl.erl')
-rw-r--r-- | src/ejabberd_ctl.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ejabberd_ctl.erl b/src/ejabberd_ctl.erl index 04e383d53..77595cd54 100644 --- a/src/ejabberd_ctl.erl +++ b/src/ejabberd_ctl.erl @@ -378,7 +378,11 @@ format_arg("", string) -> format_arg(Arg, string) -> NumChars = integer_to_list(length(Arg)), Parse = "~" ++ NumChars ++ "c", - format_arg2(Arg, Parse). + format_arg2(Arg, Parse); +format_arg(Arg, Format) -> + S = unicode:characters_to_binary(Arg, utf8), + JSON = jiffy:decode(S), + mod_http_api:format_arg(JSON, Format). format_arg2(Arg, Parse)-> {ok, [Arg2], _RemainingArguments} = io_lib:fread(Parse, Arg), @@ -525,6 +529,7 @@ print_usage(Version) -> print_usage(HelpMode, MaxC, ShCode, Version) -> AllCommands = [ + {"help", ["[arguments]"], "Get help"}, {"status", [], "Get ejabberd status"}, {"stop", [], "Stop ejabberd"}, {"restart", [], "Restart ejabberd"}, |