From c67b08f1a4f13255efea71d544583af677589860 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 12 Apr 2005 18:14:07 +0000 Subject: Fixed to prevent giving out negative keys git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1060 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_park.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/m_park.cpp b/src/modules/m_park.cpp index 17c9430fc..f957b7f37 100644 --- a/src/modules/m_park.cpp +++ b/src/modules/m_park.cpp @@ -68,7 +68,7 @@ void handle_park(char **parameters, int pcnt, userrec *user) awaylog* aw; parkedinfo pi; char msg[MAXBUF]; - long key = random() * 12345; + long key = abs(random() * 12345); snprintf(msg,MAXBUF,"You are now parked. To unpark use /UNPARK %s %d",user->nick,key); Srv->UserToPseudo(user,std::string(msg)); aw = new awaylog; -- cgit v1.2.3