updated version
[brisk.git] / web / Obj / brisk.phh
index e39c6df..8320e9d 100644 (file)
@@ -62,7 +62,7 @@ define(BRISK_SINGLE_SESS, "");
 $G_false = FALSE;
 
 $G_all_points = array( 11,10,4,3,2, 0,0,0,0,0 );
-$G_brisk_version = "spawn-0.10.4";
+$G_brisk_version = "spawn-0.10.6";
 
 $root_wellarr = Array ( 'Benvenuto in brisk (Ver. '.$G_brisk_version.'), <b>NOVITA\'</b>: dimensionamento dinamico dell\'area dati e ottimizzazione della stessa, versione beta2.',
                         'Se vuoi iscriverti alla <a target="_blank" href="http://www.milug.org/cgi-bin/mailman/listinfo/ml-briscola">Mailing List</a>, cliccala!' );
@@ -643,6 +643,16 @@ class User {
     
     return (FALSE);
   }
+
+  function reset() {
+    $tmp_sess = $this->sess;
+    $this->sess = "";
+    step_unproxy($tmp_sess);
+    $this->name = "";
+    while (array_pop($this->comm) != NULL);
+    $this->step = 0;
+    $this->the_end = FALSE;
+  }
 } // end class User
 
 
@@ -818,12 +828,16 @@ class Room {
          if ($user_cur->stat == 'table' || $user_cur->stat == 'room') {
            log_auth($user_cur->sess, "Autologout session.");
            
+           $user_cur->reset();
+           /* factorized with ->reset()
            $tmp_sess = $user_cur->sess;
            $user_cur->sess = "";
            step_unproxy($tmp_sess);
            $user_cur->name = "";
+           while (array_pop($user_cur->comm) != NULL);
            $user_cur->step = 0;
            $user_cur->the_end = FALSE;
+           */
            
            log_rd2("AUTO LOGOUT.");
            if ($user_cur->subst == 'sitdown' || $user_cur->stat == 'table')