diff options
author | Sadie Powell <sadie@witchery.services> | 2024-03-07 21:56:58 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-03-07 22:52:41 +0000 |
commit | 464e6b8010c11708bcbed7cf6b2d972977f0e286 (patch) | |
tree | 0adee0c876aee23acb1e16e2195df90500ff6e65 /src/xline.cpp | |
parent | 3272c1bbc65eaa29ba63e176ec76702c5b21d367 (diff) |
Use the C++11 random number generator instead of rand().
This is safer, faster, and doesn't require seeding.
Diffstat (limited to 'src/xline.cpp')
-rw-r--r-- | src/xline.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xline.cpp b/src/xline.cpp index cbc26a36c..41f130b47 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -249,7 +249,7 @@ Anope::string XLineManager::GenerateUID() { char c; do - c = (rand() % 75) + 48; + c = (Anope::RandomNumber() % 75) + 48; while (!isupper(c) && !isdigit(c)); id += c; } |