mirror of
https://github.com/processone/ejabberd
synced 2025-10-05 19:42:11 +02:00
Move move randoms module to p1_utils repo
This commit is contained in:
parent
50b645aa92
commit
ed1ee6061e
35 changed files with 58 additions and 149 deletions
|
@ -974,7 +974,7 @@ build_random_password(Reason) ->
|
|||
{{Year, Month, Day}, {Hour, Minute, Second}} = calendar:universal_time(),
|
||||
Date = str:format("~4..0B~2..0B~2..0BT~2..0B:~2..0B:~2..0B",
|
||||
[Year, Month, Day, Hour, Minute, Second]),
|
||||
RandomString = randoms:get_string(),
|
||||
RandomString = p1_rand:get_string(),
|
||||
<<"BANNED_ACCOUNT--", Date/binary, "--", RandomString/binary, "--", Reason/binary>>.
|
||||
|
||||
set_password_auth(User, Server, Password) ->
|
||||
|
@ -1515,7 +1515,7 @@ send_message(Type, From, To, Subject, Body) ->
|
|||
build_packet(Type, Subject, Body) ->
|
||||
#message{type = misc:binary_to_atom(Type),
|
||||
body = xmpp:mk_text(Body),
|
||||
id = randoms:get_string(),
|
||||
id = p1_rand:get_string(),
|
||||
subject = xmpp:mk_text(Subject)}.
|
||||
|
||||
send_stanza(FromString, ToString, Stanza) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue