* FIX: added extra check for calling 120, etc. so that people can't cheat
[e-DoKo.git] / functions.php
index 418591dd2d04537a3cb9582a9ee3e745f5871fa8..997ba43e154af02582aa59ff981015d2e85628fa 100644 (file)
@@ -656,7 +656,7 @@ function can_call($what,$hash)
   $gameid   = DB_get_gameid_by_hash($hash);
   $gametype = DB_get_gametype_by_gameid($gameid);
 
   $gameid   = DB_get_gameid_by_hash($hash);
   $gametype = DB_get_gametype_by_gameid($gameid);
 
-  $NRcards  = count(DB_get_hand($me));
+  $NRcards  = count(DB_get_hand($hash));
   
   $NRallcards = 0;
   for ($i=1;$i<5;$i++)
   
   $NRallcards = 0;
   for ($i=1;$i<5;$i++)
@@ -681,7 +681,7 @@ function can_call($what,$hash)
        return 1;
       break;
     case "5th-card":
        return 1;
       break;
     case "5th-card":
-      if( 27+4*($what/30)) <= $NRallcards + $offset*4)
+      if( 27+4*($what/30) <= $NRallcards + $offset*4)
        return 1;
       break;
     case "9-cards":
        return 1;
       break;
     case "9-cards":