mirror of
https://github.com/anope/anope.git
synced 2026-07-03 07:33:14 +02:00
Use the C++11 random number generator instead of rand().
This is safer, faster, and doesn't require seeding.
This commit is contained in:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user