From 464e6b8010c11708bcbed7cf6b2d972977f0e286 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 7 Mar 2024 21:56:58 +0000 Subject: Use the C++11 random number generator instead of rand(). This is safer, faster, and doesn't require seeding. --- include/anope.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/anope.h b/include/anope.h index bafd862e7..000e74d1a 100644 --- a/include/anope.h +++ b/include/anope.h @@ -558,6 +558,9 @@ namespace Anope */ extern CoreExport Anope::string Random(size_t len); + /** Generate a random number. */ + extern CoreExport int RandomNumber(); + /** Calculates the levenshtein distance between two strings. * @param s1 The first string. * @param s2 The second string. -- cgit