diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-12 18:14:07 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-12 18:14:07 +0000 |
commit | c67b08f1a4f13255efea71d544583af677589860 (patch) | |
tree | ed59402dfa5002faf569e212c43cbf2c71659df2 | |
parent | 01110d34c58fdc7dd341a8cb3614187acbfee4d5 (diff) |
Fixed to prevent giving out negative keys
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1060 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_park.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |