version update
[brisk.git] / web / Obj / brisk.phh
index 4cd3b18..54d39f4 100644 (file)
@@ -153,12 +153,12 @@ $mlang_brisk = array( 'btn_backstand'=> array( 'it' => 'torna in piedi',
 $G_lng = langtolng($G_lang);
 
 $G_all_points = array( 11,10,4,3,2, 0,0,0,0,0 );
-$G_brisk_version = "4.15.0";
+$G_brisk_version = "4.16.0";
 
 /* MLANG: ALL THE INFO STRINGS IN brisk.phh */
-$root_wellarr = array( 'it' => array ( 'Brisk (Ver. '.$G_brisk_version.'), <b>NOVITA\'</b>: primo passo per rendere piĆ¹ robusto il sistema di notifica.',
+$root_wellarr = array( 'it' => array ( 'Brisk (Ver. '.$G_brisk_version.'), <b>NOVITA\'</b>: rifattorizzazione del motore di Brisk e messaggio di uscita.',
                                        'Se vuoi iscriverti alla <a target="_blank" href="mailto:ml-briscola+subscribe@milug.org">Mailing List</a>, cliccala!' ),
-                       'en' => array ( 'Brisk (Ver. '.$G_brisk_version.'), <b>NEWS</b>: new users subscription system, refactored sidebanner system.',
+                       'en' => array ( 'Brisk (Ver. '.$G_brisk_version.'), <b>NEWS</b>: engine refactoring and logout message.',
                                        'If you want to subscribe our <a target="_blank" href="ml-briscola+subscribe@milug.org">Mailing List</a>, click it!' ) );
 
 $G_room_help = array( 'it' => '
@@ -983,7 +983,7 @@ class Client_prefs {
     }
 }
 
-define('GHOST_SESS_TOUT', 300);
+define('GHOST_SESS_TOUT', 1800);
 define('GHOST_SESS_REAS_LOUT', 1); // logout
 define('GHOST_SESS_REAS_ANOT', 2); // another user get session
 define('GHOST_SESS_REAS_TOUT', 3); // room timeout
@@ -1867,6 +1867,37 @@ class Brisk
         /* for old isolation management $is_ticker = TRUE; */
       } while (0);
     } // /tav chat command
+    // just for development use currently
+    else if (FALSE && strncmp($msg, "/out ", 5) == 0) {
+        fprintf(STDERR, "MOP OUT\n");
+       $target = substr($msg, 5);
+        for ($i = 0 ; $i < MAX_PLAYERS ; $i++) {
+            $user_out = $this->user[$i];
+            if (!strcmp($user_out->name, $target)) {
+
+                $user_out->the_end = TRUE;
+                fprintf(STDERR, "MOP: GHOST_SESS: %d\n", GHOST_SESS_REAS_LOUT);
+                $this->ghost_sess->push($curtime, $user_out->sess, GHOST_SESS_REAS_LOUT);
+
+                if ($user_out->stat == 'table' || $user_out->stat == 'room') {
+                    if ($user_out->subst == 'sitdown' || $user_out->stat == 'table') {
+                        $this->room_wakeup($user_out);
+                    }
+                    else if ($user_out->subst == 'standup') {
+                        $this->room_outstandup($user_out);
+                    }
+                    else {
+                        log_rd2("LOGOUT FROM WHAT ???");
+                    }
+                }
+
+                fprintf(STDERR, "MOP: OUT FIND [%s] step %d rd_step %d\n", $target, $user_out->step,  $user_out->rd_step);
+                break;
+            }
+        }
+    }
+
+
 
     else if (strncmp($msg, "/alarm ", 7) == 0) {
       if (strncmp($msg, "/alarm to ", 10) == 0) {
@@ -2359,7 +2390,7 @@ class Brisk
 
       $idx = $ghost;
       if (defined('CURL_DE_SAC_VERS')) {
-          brisk_cds_execute($this, $ghost, $real_idx, $sess, $ip, $authenticate, $header);
+          brisk_cds_execute($this, $ghost, $idx, $sess, $ip, $authenticate, $header);
       }
       return ($this->user[$ghost]);
     }