summaryrefslogtreecommitdiffstats
path: root/digest.php
diff options
context:
space:
mode:
Diffstat (limited to 'digest.php')
-rw-r--r--digest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/digest.php b/digest.php
index 0762519..d501e0a 100644
--- a/digest.php
+++ b/digest.php
@@ -105,6 +105,16 @@ foreach($users as $uid)
// get messages
$messages = DB_get_digest_message_by_email($email);
+ // check messages for outdated ones and delete those
+ foreach ($messages as $key=>$mess)
+ {
+ if($mess[2] == 'your_turn' && $uid != DB_get_player_by_gameid($mess[3]) )
+ {
+ DB_digest_delete_message($mess[0]);
+ unset($messages[$key]);
+ }
+ }
+
// add them together
if(sizeof($messages))
{