mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: rename $GetRandom -> $GetRandomNumber
This commit is contained in:
parent
a1d05f93c6
commit
529dbbe4f8
|
@ -27,7 +27,7 @@
|
||||||
:global DNSIsResolving;
|
:global DNSIsResolving;
|
||||||
:global DownloadPackage;
|
:global DownloadPackage;
|
||||||
:global GetMacVendor;
|
:global GetMacVendor;
|
||||||
:global GetRandom;
|
:global GetRandomNumber;
|
||||||
:global GetRandomSha256;
|
:global GetRandomSha256;
|
||||||
:global LogPrintExit;
|
:global LogPrintExit;
|
||||||
:global MailServerIsUp;
|
:global MailServerIsUp;
|
||||||
|
@ -307,7 +307,7 @@
|
||||||
# generate random number
|
# generate random number
|
||||||
# Warning: This is a *very* weak algorithm and in *no way*
|
# Warning: This is a *very* weak algorithm and in *no way*
|
||||||
# useful for cryptography or similar!
|
# useful for cryptography or similar!
|
||||||
:set GetRandom do={
|
:set GetRandomNumber do={
|
||||||
:local Max ([ :tonum $1 ] + 1);
|
:local Max ([ :tonum $1 ] + 1);
|
||||||
:local Sum 0;
|
:local Sum 0;
|
||||||
|
|
||||||
|
@ -415,9 +415,9 @@
|
||||||
|
|
||||||
# delay a random amount of seconds
|
# delay a random amount of seconds
|
||||||
:set RandomDelay do={
|
:set RandomDelay do={
|
||||||
:global GetRandom;
|
:global GetRandomNumber;
|
||||||
|
|
||||||
:delay ([ $GetRandom $1 ] . "s");
|
:delay ([ $GetRandomNumber $1 ] . "s");
|
||||||
}
|
}
|
||||||
|
|
||||||
# check if script is run from terminal
|
# check if script is run from terminal
|
||||||
|
|
Loading…
Reference in a new issue