mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
mod_admin_extra: for support in ejabberd-v13.x changed args from string to binary : all changes tested with ejabberdv13.12
This commit is contained in:
parent
d72c739630
commit
f314da7b1f
@ -166,7 +166,7 @@ commands() ->
|
||||
#ejabberd_commands{name = num_active_users, tags = [accounts, stats],
|
||||
desc = "Get number of users active in the last days",
|
||||
module = ?MODULE, function = num_active_users,
|
||||
args = [{host, string}, {days, integer}],
|
||||
args = [{host, binary}, {days, integer}],
|
||||
result = {users, integer}},
|
||||
#ejabberd_commands{name = delete_old_users, tags = [accounts, purge],
|
||||
desc = "Delete users that didn't log in last days, or that never logged",
|
||||
@ -176,24 +176,24 @@ commands() ->
|
||||
#ejabberd_commands{name = delete_old_users_vhost, tags = [accounts, purge],
|
||||
desc = "Delete users that didn't log in last days in vhost, or that never logged",
|
||||
module = ?MODULE, function = delete_old_users_vhost,
|
||||
args = [{host, string}, {days, integer}],
|
||||
args = [{host, binary}, {days, integer}],
|
||||
result = {res, restuple}},
|
||||
|
||||
#ejabberd_commands{name = check_account, tags = [accounts],
|
||||
desc = "Check if an account exists or not",
|
||||
module = ejabberd_auth, function = is_user_exists,
|
||||
args = [{user, string}, {host, string}],
|
||||
args = [{user, binary}, {host, binary}],
|
||||
result = {res, rescode}},
|
||||
#ejabberd_commands{name = check_password, tags = [accounts],
|
||||
desc = "Check if a password is correct",
|
||||
module = ejabberd_auth, function = check_password,
|
||||
args = [{user, string}, {host, string}, {password, string}],
|
||||
args = [{user, binary}, {host, binary}, {password, binary}],
|
||||
result = {res, rescode}},
|
||||
#ejabberd_commands{name = check_password_hash, tags = [accounts],
|
||||
desc = "Check if the password hash is correct",
|
||||
longdesc = "Allowed hash methods: md5, sha.",
|
||||
module = ?MODULE, function = check_password_hash,
|
||||
args = [{user, string}, {host, string}, {passwordhash, string}, {hashmethod, string}],
|
||||
args = [{user, binary}, {host, binary}, {passwordhash, binary}, {hashmethod, binary}],
|
||||
result = {res, rescode}},
|
||||
#ejabberd_commands{name = change_password, tags = [accounts],
|
||||
desc = "Change the password of an account",
|
||||
@ -203,18 +203,18 @@ commands() ->
|
||||
#ejabberd_commands{name = ban_account, tags = [accounts],
|
||||
desc = "Ban an account: kick sessions and set random password",
|
||||
module = ?MODULE, function = ban_account,
|
||||
args = [{user, string}, {host, string}, {reason, string}],
|
||||
args = [{user, binary}, {host, binary}, {reason, binary}],
|
||||
result = {res, rescode}},
|
||||
|
||||
#ejabberd_commands{name = num_resources, tags = [session],
|
||||
desc = "Get the number of resources of a user",
|
||||
module = ?MODULE, function = num_resources,
|
||||
args = [{user, string}, {host, string}],
|
||||
args = [{user, binary}, {host, binary}],
|
||||
result = {resources, integer}},
|
||||
#ejabberd_commands{name = resource_num, tags = [session],
|
||||
desc = "Resource string of a session number",
|
||||
module = ?MODULE, function = resource_num,
|
||||
args = [{user, string}, {host, string}, {num, integer}],
|
||||
args = [{user, binary}, {host, binary}, {num, integer}],
|
||||
result = {resource, string}},
|
||||
#ejabberd_commands{name = kick_session, tags = [session],
|
||||
desc = "Kick a user session",
|
||||
@ -442,7 +442,7 @@ commands() ->
|
||||
longdesc = "Timestamp is the seconds since"
|
||||
"1970-01-01 00:00:00 UTC, for example: date +%s",
|
||||
module = ?MODULE, function = get_last,
|
||||
args = [{user, string}, {host, string}],
|
||||
args = [{user, binary}, {host, binary}],
|
||||
result = {last_activity, string}},
|
||||
#ejabberd_commands{name = set_last, tags = [last],
|
||||
desc = "Set last activity information",
|
||||
|
Loading…
Reference in New Issue
Block a user