summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-12 18:14:07 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-12 18:14:07 +0000
commitc67b08f1a4f13255efea71d544583af677589860 (patch)
treeed59402dfa5002faf569e212c43cbf2c71659df2 /src/modules
parent01110d34c58fdc7dd341a8cb3614187acbfee4d5 (diff)
Fixed to prevent giving out negative keys
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1060 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_park.cpp2
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;