1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Ensure the message is at least 10 seconds old

Otherwise slower clients would get problems with two messages directly after each other
This commit is contained in:
Tim Düsterhus 2012-04-27 20:16:58 +02:00
parent 211c6485a8
commit a3bdeba53c

View File

@ -50,10 +50,12 @@ public static function getDiedUsers() {
time
FROM
wcf".WCF_N."_chat_message
WHERE
time < ?
ORDER BY
messageID DESC";
$stmt = WCF::getDB()->prepareStatement($sql, 1, 1);
$stmt->execute();
$stmt->execute(array(TIME_NOW - 10));
$time = $stmt->fetchColumn();
}
else {