chat reset in user class
[brisk.git] / web / Obj / brisk.phh
index 6feb8e8..a9e8f84 100644 (file)
@@ -75,9 +75,9 @@ 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.3";
 
-$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>: comando /tav per annunciare i tavoli attivi - versione Beta4.',
                         '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 +735,12 @@ class User {
     while (array_pop($this->comm) != NULL);
     $this->step = 0;
     $this->the_end = FALSE;
+
+    $this->chattime = array_fill(0, CHAT_N, 0);
+    $this->chat_cur = 0;
+    $this->chat_lst = "";
+    $this->chat_ban = 0;
+    $this->chat_dlt = 0;
   }
 } // end class User
 
@@ -1311,7 +1317,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