- /* TODO: should we keep statistics of this? */
- $message = "Hello, \n\n".
- " the game has been canceled because ".DB_get_name('userid',$nines).
- " has five or more nines and nobody is playing solo.\n\n".
- " To redeal either start a new game or, in case the game was part of a tournament, \n".
- " go to the last game and use the link at the bottom of the page to redeal.";
+ if($cancelsick == 'nines')
+ {
+ $message = "The game has been canceled because ".DB_get_name('userid',$cancel).
+ " has five or more nines and nobody is playing solo.\n\n".
+ "To redeal either start a new game or, in case the game was part of a tournament,\n".
+ "go to the last game and use the link at the bottom of the page to redeal.\n\n";
+
+ /* update game status */
+ cancel_game('nines',$gameid);
+
+ echo "<p>The game has been canceled because ".DB_get_name('userid',$cancel).
+ " has five or more nines and nobody is playing solo.</p>\n";
+ }
+ else if ($cancelsick == 'lowtrump')
+ {
+ $message = "The game has been canceled because ".DB_get_name('userid',$cancel).
+ " has low trump and nobody is playing solo.\n\n".
+ "To redeal either start a new game or, in case the game was part of a tournament,\n".
+ "go to the last game and use the link at the bottom of the page to redeal.\n\n";
+
+ /* update game status */
+ cancel_game('lowtrump',$gameid);
+
+ echo "<p>The game has been canceled because ".DB_get_name('userid',$cancel).
+ " has low trump and nobody is playing solo.</p>\n";
+ };