roadmap and topbanner added
[brisk.git] / web / Obj / brisk.phh
index 93b9983..eaba39d 100644 (file)
@@ -27,7 +27,7 @@ define(BRISK_CONF, "brisk.conf.pho");
 define(FTOK_PATH, "/var/lib/brisk");
 define(LEGAL_PATH, "/tmp/legal_brisk");
 define(PROXY_PATH, "/var/lib/brisk_proxy");
-define(TABLES_N, 24);
+define(TABLES_N, 32);
 define(PLAYERS_N, 3);
 define(MAX_POINTS, 5);
 define(MAX_PLAYERS, (20 + (PLAYERS_N * TABLES_N)));
@@ -72,13 +72,12 @@ define(BRISK_SINGLE_SESS, "");
 
 require_once("$DOCUMENT_ROOT/Etc/".BRISK_CONF);
 
-
 $G_false = FALSE;
 
 $G_all_points = array( 11,10,4,3,2, 0,0,0,0,0 );
-$G_brisk_version = "spawn-0.12.0";
+$G_brisk_version = "spawn-0.13.4";
 
-$root_wellarr = Array ( 'Benvenuto in brisk (Ver. '.$G_brisk_version.'), <b>NOVITA\'</b>: aggiunta messaggistica a tutti i tavoli - versione beta2.',
+$root_wellarr = Array ( 'Benvenuto in brisk (Ver. '.$G_brisk_version.'), <b>NOVITA\'</b>: bug del ticker e della carta coperta che rimane sul tavolo chiusi - Beta6.',
                         'Se vuoi iscriverti alla <a target="_blank" href="http://www.milug.org/cgi-bin/mailman/listinfo/ml-briscola">Mailing List</a>, cliccala!' );
 $table_wellarr = Array ( 'Benvenuto al tavolo. Se almeno tre giocatori non sbloccano l\'uscita cliccando il lucchetto, chi esce non pu&ograve; risedersi a un qualunque tavolo per '.floor(BAN_TIME/60).' minuti.');
 
@@ -735,6 +734,11 @@ class User {
     $this->name = "";
     while (array_pop($this->comm) != NULL);
     $this->step = 0;
+    $this->chattime = array_fill(0, CHAT_N, 0);
+    $this->chat_cur = 0;
+    $this->chat_lst = "";
+    $this->chat_ban = 0;
+    $this->chat_dlt = 0;
     $this->the_end = FALSE;
   }
 } // end class User
@@ -1213,11 +1217,12 @@ class Room {
   {
     log_main("room_sitdown ".($user == FALSE ? "USER: FALSE" : "USER: ".$user->name));
 
+    $train_app = "";
+
     if ($table_idx > -1 && $table_idx < TABLES_N) { 
       $table = &$this->table[$table_idx];
 
       // wagon shutdown 
-      $train_app = "";
       if ($table->wag_own != NULL && $table->player_n == PLAYERS_N) {        
         for ($i = 0 ; $i < TABLES_N ; $i++) {
           $user_cur =& $this->user[$table->player[$i]];
@@ -1266,7 +1271,7 @@ class Room {
     $only_you = FALSE;
     
     // common settings
-    $msg = substr($mesg,6);
+    $msg = substr($mesg, 6, 128);
     $timecur = time();
     $dt = date("H:i ", $timecur);
 
@@ -1311,7 +1316,8 @@ class Room {
         $msg = substr($msg, 5);
         
         $table->wag_set($user, $msg);
-        $to_room = sprintf('tra.add(%d, "%s");', $user->table, xcape(sprintf("%s: %s", $user->name, $msg)));
+        $to_user = sprintf('tra.add(%d, "%s");', $user->table, xcape(sprintf("%s: %s", $user->name, $msg)));
+        $to_room = $to_user;
         
       } while (0);
     } // /tav chat command
@@ -1391,7 +1397,9 @@ class Room {
       }
       else {
         $to_user = sprintf('chatt_sub("%s","%s");', $dt.xcape($user->name), xcape($msg));
-        $to_room = $to_user;
+       // temporary silentiation for troll (will became array check)
+       if (strcasecmp($user->name,'JackRokka') != 0 && $user->sess != '47ea653f602e8')
+           $to_room = $to_user;
       }
 
       log_legal($timecur, $user->sess, $user->name,