summaryrefslogtreecommitdiff
path: root/src/nickserv.c
diff options
context:
space:
mode:
authorkeeper keeper@31f1291d-b8d6-0310-a050-a5561fc1590b <keeper keeper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-09-09 15:51:33 +0000
committerkeeper keeper@31f1291d-b8d6-0310-a050-a5561fc1590b <keeper keeper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-09-09 15:51:33 +0000
commite41e4cd69e4df7c18865e85146c06f95c5d31080 (patch)
tree6887e2863cb8040c69abc18d2c4b0ef8a807d638 /src/nickserv.c
parent6c2674da5a94ec7ea60749276d462aa291c70001 (diff)
BUILD : 1.7.5 (342) BUGS : #00 NOTES : Certus: Replaced current rand-implementation with arc4random and replaced C++ comments with C-style comments (gcc 2.95 might complain).
git-svn-id: svn://svn.anope.org/anope/trunk@342 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@218 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/nickserv.c')
-rw-r--r--src/nickserv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nickserv.c b/src/nickserv.c
index e9fff9fce..0c00df3e8 100644
--- a/src/nickserv.c
+++ b/src/nickserv.c
@@ -2010,12 +2010,11 @@ static int do_register(User * u)
notice_lang(s_NickServ, u, PASSWORD_TRUNCATED, PASSMAX - 1);
}
#endif
- srand((unsigned) time(NULL));
for (idx = 0; idx < 9; idx++) {
passcode[idx] =
chars[(1 +
- (int) (((float) (max - min)) * rand() /
- (RAND_MAX + 1.0)) + min)];
+ (int) (((float) (max - min)) * getrandom16() /
+ (65535 + 1.0)) + min)];
} passcode[idx] = '\0';
nr = makerequest(u->nick);
nr->passcode = sstrdup(passcode);