define(SESS_LEN, 13);
define(STREAM_TIMEOUT, 20);
define(EXPIRE_TIME_RD, 180);
-define(EXPIRE_TIME_SMAMMA, 300);
+define(EXPIRE_TIME_SMAMMA, 180);
define(GARBAGE_TIMEOUT, 10);
define(NICKSERV, "<i>SERVER</i>");
define(BRISK_DEBUG, FALSE);
else
log_rd2($sess, "LOGOUT FROM WHAT ???");
}
- // } // if (0 == 1)
-
}
if ($user_cur->laccwr + EXPIRE_TIME_SMAMMA < $curtime) { // lo rimettiamo in piedi
log_main("WAKEUP", "begin function table:".$table_idx." stat: ".$user->stat." subst: ".$user->subst);
+ $curtime = time();
+
$from_table = ($user->stat == "table");
if ($from_table) {
log_main("WAKEUP", "from table [".$user->table."] nplayers_n: ".$this->table[$user->table]->player_n);
if ($user_cur != $user) {
$user_cur->stat = "room";
$user_cur->subst = "sitdown";
+ $user_cur->laccwr = $curtime;
}
else if ($user->sess != "") {
$user_cur->stat = "room";
$user_cur->subst = "standup";
+ $user_cur->laccwr = $curtime;
$user_cur->table = -1;
}
}
else {
$user->stat = "room";
$user->subst = "standup";
+ $user->laccwr = $curtime;
}
/* aggiorna l'array dei giocatori al tavolo. */
$table->user_rem(&$this, &$user);
$this->user[$idx]->name = $name;
$this->user[$idx]->stat = "room";
$this->user[$idx]->subst = "standup";
+ $this->user[$idx]->laccwr = time();
log_main("XXX", sprintf("TROVATO LIBERO A [%d] sess [%s] name [%s]", $idx, $sess, $name));
$table->init();
$table->game_init(&$bri);
-
+ $curtime = time();
+
for ($i = 0 ; $i < $table->player_n ; $i++) {
$user_cur = &$bri->user[$table->player[$i]];
log_wr($sess, "Pre if!");
$user_cur->stat = 'table';
$user_cur->subst = 'asta';
+ $user_cur->laccwr = $curtime;
$user_cur->step++;
$user_cur->comm[$user_cur->step % COMM_N] = show_table(&$bri,&$user_cur,$user_cur->step+1,TRUE, FALSE);