X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Findex_wr.php;h=7fbf6a383f16ede6d412556aaef7fb73895c2fd8;hb=44d6ac386631aa525344c168e3441f95d885dfa7;hp=c006b2539904477d68e3d197088689a90b940189;hpb=76c741c96af4d4afa5096acd60bf2069c638fd7b;p=brisk.git diff --git a/web/index_wr.php b/web/index_wr.php index c006b25..7fbf6a3 100644 --- a/web/index_wr.php +++ b/web/index_wr.php @@ -60,7 +60,25 @@ if ($argz[0] == 'shutdown') { log_rd2($sess, "SHUTDOWN FROM WHAT ???"); } else if ($user->stat == 'room') { - if ($argz[0] == 'logout') { + $user->laccwr = time(); + + if ($argz[0] == 'help') { + $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; + $user->comm[$user->step % COMM_N] .= show_notify(str_replace("\n", " ", $G_room_help), 0, "torna ai tavoli", 600, 500); + + log_wr($sess, $user->comm[$user->step % COMM_N]); + $user->step++; + + } + else if ($argz[0] == 'about') { + $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; + $user->comm[$user->step % COMM_N] .= show_notify(str_replace("\n", " ", $G_room_about), 0, "torna ai tavoli", 400, 200); + + log_wr($sess, $user->comm[$user->step % COMM_N]); + $user->step++; + + } + else if ($argz[0] == 'logout') { $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; $user->comm[$user->step % COMM_N] .= sprintf('postact_logout();'); $user->the_end = TRUE; @@ -97,7 +115,8 @@ else if ($user->stat == 'room') { $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!"); @@ -111,6 +130,7 @@ else if ($user->stat == 'room') { $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); @@ -140,6 +160,7 @@ else if ($user->stat == 'room') { * * ***************/ else if ($user->stat == 'table' && $user->subst == 'asta') { + $user->laccwr = time(); $table = &$bri->table[$user->table]; if ($argz[0] == 'logout') { @@ -152,10 +173,7 @@ else if ($user->stat == 'table' && $user->subst == 'asta') { log_wr($sess, "PER DI TABLEINFO"); $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; $user->comm[$user->step % COMM_N] .= show_table_info(&$bri, &$table, $user->table_pos); - log_wr($sess, $user->comm[$user->step % COMM_N]); - - $user->step++; } else if ($argz[0] == 'chatt') { @@ -225,8 +243,9 @@ else if ($user->stat == 'table' && $user->subst == 'asta') { $maxcard = $user_cur->asta_card; } - if ($table->asta_pla_n > ($maxcard > -1 ? 1 : 0) && + if (($table->asta_pla_n > ($maxcard > -1 ? 1 : 0)) && !($table->asta_card == 9 && $table->asta_pnt == 120)) { + log_wr($sess,"ALLOPPA QUI"); for ($i = 1 ; $i < PLAYERS_N ; $i++) { $index_next = ($table->gstart + $i) % PLAYERS_N; if ($table->asta_pla[$index_next]) { @@ -272,7 +291,7 @@ else if ($user->stat == 'table' && $user->subst == 'asta') { else { log_wr($sess, "FINITA !"); // if a_pnt == 120 supergame ! else abbandono - if ($a_pnt == 120) { + if ($a_pnt == 120 || $user->asta_card != -1) { $chooser = $index_cur; for ($i = 1 ; $i < PLAYERS_N ; $i++) if ($i != $chooser)