proxyscan to check (and deny) proxy connections
[brisk.git] / web / briskin5 / index_wr.php
index 381b3ff..3935e0a 100644 (file)
  */
 
 require_once("../Obj/brisk.phh");
+require_once("../Obj/proxyscan.phh");
 require_once("Obj/briskin5.phh");
 
+// Use of proxies isn't allowed.
+if (is_proxy()) {
+  sleep(5);
+  exit;
+}
+
 if (DEBUGGING == "local" && $_SERVER['REMOTE_ADDR'] != '127.0.0.1') {
   echo "Debugging time!";
   exit;
@@ -103,7 +110,7 @@ else if ($user->stat == 'table') {
       if ($lockcalc < 3) {
        $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; ";
        $user->comm[$user->step % COMM_N] .= $table->exitlock_show(&$bri->user, $user->table_pos);
-       $user->comm[$user->step % COMM_N] .=  show_notify("<br>I dati presenti sul server non erano allineati con quelli inviati dal tuo browser, adesso lo sono. Riprova ora.", 2000, "Torna alla partita.", 400, 100);
+       $user->comm[$user->step % COMM_N] .=  show_notify("<br>I dati presenti sul server non erano allineati con quelli inviati dal tuo browser, adesso lo sono. Riprova ora.", 2000, "torna alla partita.", 400, 100);
        
        log_wr($user->comm[$user->step % COMM_N]);
        $user->step_inc();
@@ -401,7 +408,7 @@ else if ($user->stat == 'table') {
          $turn_nex = ($table->gstart + $table->turn) % BRISKIN5_PLAYERS_N;
 
          log_wr(sprintf("The winner is: [%d] [%s]", $winner, $bri->user[$table->player[$winner]]->name));
-         $card_take = sprintf("sleep(gst,2000);|cards_take(%d);|cards_hidetake($d);",
+         $card_take = sprintf("sleep(gst,2000);|cards_take(%d);",
                               $winner, $winner);
          $player_cur = "remark_off();" . $card_take . "|"; 
          if ($turn_cur != $turn_nex)