From 5bca9885d5bda1b380b354d36afd5528aa58e2ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 19 Mar 2013 17:55:33 +0100 Subject: [PATCH] Fix activity points for join --- file/lib/page/ChatPage.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/file/lib/page/ChatPage.class.php b/file/lib/page/ChatPage.class.php index 610d779..c3a661b 100644 --- a/file/lib/page/ChatPage.class.php +++ b/file/lib/page/ChatPage.class.php @@ -192,7 +192,10 @@ public function show() { parent::show(); // add activity points - \wcf\system\user\activity\point\UserActivityPointHandler::getInstance()->fireEvent('be.bastelstu.chat.activityPointEvent.join', (microtime(true) * 1000 & 0xFFFFFFFF), WCF::getUser()->userID); + $microtime = microtime(true) * 1000; + $result = $microtime & 0xFFFFFFFF; + if ($result > 0x7FFFFFFF) $result -= 0x80000000; + \wcf\system\user\activity\point\UserActivityPointHandler::getInstance()->fireEvent('be.bastelstu.chat.activityPointEvent.join', $result, WCF::getUser()->userID); // break if not using ajax if ($this->useTemplate) exit;