From: Matteo Nastasi Date: Sun, 9 Jul 2017 17:02:31 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/together-for-fun' into nginx X-Git-Tag: v5.6.0~33 X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=brisk.git;a=commitdiff_plain;h=c0cc54c9494acf8f43b92a0517d32d38b5006aa0 Merge remote-tracking branch 'origin/together-for-fun' into nginx Conflicts: web/briskin5/Obj/briskin5.phh web/briskin5/index_wr.php web/briskin5/stat-day.php web/briskin5/statadm.php --- c0cc54c9494acf8f43b92a0517d32d38b5006aa0 diff --cc web/briskin5/Obj/briskin5.phh index 67b584c,5e22966..c9002b9 --- a/web/briskin5/Obj/briskin5.phh +++ b/web/briskin5/Obj/briskin5.phh @@@ -1610,11 -1560,13 +1561,13 @@@ function show_table(&$bri, &$user, $sen $table_pos = $user->table_pos; $ret = "table_init();"; - $ret .= $table->exitlock_show(&$bri->user, $table_pos); + $ret .= $table->exitlock_show($bri->user, $table_pos); if (!$is_again) { /* GENERAL STATUS */ - $ret .= sprintf( 'gst.st = %d; stat = "%s"; subst = "%s"; table_pos = %d;', - $sendstep, $user->stat, $user->subst, $table_pos); + $user_rules = $user->rules_get(); + $ret .= sprintf('gst.st = %d; stat = "%s"; subst = "%s"; table_pos = %d; rules_set(%d);', + $sendstep, $user->stat, $user->subst, $table_pos, + ($user_rules == BIN5_USER_CONTINUE_INIT ? $table->rules->id_get() : $user_rules)); log_rd(sprintf( 'SHOW_TABLE: gst.st = %d; stat = "%s"; subst = "%s"; table_pos = %d;', $sendstep, $user->stat, $user->subst, $table_pos)); diff --cc web/briskin5/index_wr.php index bc69682,a80a554..09c030a --- a/web/briskin5/index_wr.php +++ b/web/briskin5/index_wr.php @@@ -53,13 -54,9 +54,9 @@@ function bin5_index_wr_main(&$bin5, $re if (($CO_bin5_pref_ring_endauct = gpcs_var('CO_bin5_pref_ring_endauct', $get, $post, $cookie)) === FALSE) $CO_bin5_pref_ring_endauct = ""; - - log_wr(0, 'bin::index_wr.php: COMM: '.xcapemesg($mesg)); - - if (($user = &$bin5->get_user($sess, &$idx)) == FALSE) { + if (($user = &$bin5->get_user($sess, $idx)) == FALSE) { echo "Get User Error"; log_wr("Get User Error"); return FALSE; @@@ -172,33 -169,7 +169,7 @@@ } else if ($user->subst == 'asta') { if ($argz[0] == 'lascio') { - // && $user->handpt <= 2) { - /* $index_cur = $table->gstart % BIN5_PLAYERS_N; */ - - /* log_wr(sprintf("GIOCO FINITO !!!")); */ - - /* $table->mult += 1; */ - /* $table->old_reason = sprintf("Ha lasciato %s perché aveva al massimo 2 punti.", xcape($user->name)); */ - - /* // Non si cambia mazzo se si abbandona la partita */ - /* $table->game_next(0); */ - - /* if ($user->table_orig < TABLES_AUTH_N) { */ - /* require_once("../Obj/dbase_".$G_dbasetype.".phh"); */ - - /* if (($bdb = BriskDB::create()) != FALSE) { */ - /* $bdb->bin5_points_save($curtime, $table, $user->table_orig, $ucodes, $pt_cur); */ - /* unset($bdb); */ - /* } */ - /* else { */ - /* log_points($remote_addr, $curtime, $user, "STAT:BRISKIN5:FINISH_GAME", "DATABASE CONNECTION FAILED"); */ - /* } */ - /* log_points($curtime, $user, "STAT:BRISKIN5:FINISH_GAME", $plist); */ - /* } */ - - /* $table->game_init(&$bin5->user); */ - - if ($table->rules_engine($bin5, $curtime, BIN5_RULES_ABANDON, $user)) { - if ($table->rules->engine(&$bin5, $curtime, BIN5_RULES_ABANDON, $user)) { ++ if ($table->rules->engine($bin5, $curtime, BIN5_RULES_ABANDON, $user)) { for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) { $user_cur = &$bin5->user[$table->player[$i]]; @@@ -490,10 -483,10 +483,10 @@@ if ($table->turn == (BIN5_PLAYERS_N * BIN5_CARD_HAND)) { /* game finished */ log_wr(sprintf("GIOCO FINITO !!!")); - if ($table->rules_engine($bin5, $curtime, BIN5_RULES_FINISH, $user)) { - if ($table->rules->engine(&$bin5, $curtime, BIN5_RULES_FINISH, $user)) { ++ if ($table->rules->engine($bin5, $curtime, BIN5_RULES_FINISH, $user)) { for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) { $user_cur = &$bin5->user[$table->player[$i]]; - $retar[$i] .= show_table(&$bin5,&$user_cur,$user_cur->step+1,TRUE, TRUE); + $retar[$i] .= show_table($bin5, $user_cur, $user_cur->step+1, TRUE, TRUE); } } }