From 47696cec5d0749f2ff8c4575e942902c5522d06c Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Fri, 21 Aug 2009 07:23:32 +0000 Subject: [PATCH] preferences management and sound when auction finish added --- web/briskin5/index_wr.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/web/briskin5/index_wr.php b/web/briskin5/index_wr.php index 1ed5e59..48cc433 100644 --- a/web/briskin5/index_wr.php +++ b/web/briskin5/index_wr.php @@ -99,6 +99,16 @@ else if ($user->stat == 'table') { else if ($argz[0] == 'chatt') { $bri->chatt_send(&$user,$mesg); } + else if ($argz[0] == 'preferences_update') { + GLOBAL $CO_bin5_pref_ring_endauct; + + log_wr("PER DI TABLEINFO"); + + if ($CO_bin5_pref_ring_endauct == "true") + $user->privflags |= BIN5_USER_FLAG_RING_ENDAUCT; + else + $user->privflags &= ~BIN5_USER_FLAG_RING_ENDAUCT; + } else if ($argz[0] == 'logout') { $remcalc = $argz[1]; @@ -347,6 +357,11 @@ else if ($user->stat == 'table') { $user_cur->subst = 'game'; $ret = sprintf('gst.st = %d; subst = "game";', $user_cur->step+1); + if ($user_cur->privflags & BIN5_USER_FLAG_RING_ENDAUCT) { + // $ret .= "var de_che= 33;"; + $ret .= playsound("ringbell.mp3"); + } + $ret .= sprintf('document.title = "Brisk - Tavolo %d";', $user->table_orig); /* bg of caller cell */ $ret .= briscola_show($bri, $table, $user_cur); @@ -467,7 +482,8 @@ else if ($user->stat == 'table') { $plist .= '|'.xcapelt($user_cur->name).'|'.$pt_cur[$i]; } log_legal($curtime, $user, "STAT:BRISKIN5:FINISH_GAME", $plist); - log_points($curtime, $user, "STAT:BRISKIN5:FINISH_GAME", $plist); + if ($user->table_orig < TABLES_AUTH_N) + log_points($curtime, xcapelt($user), "STAT:BRISKIN5:FINISH_GAME", $plist); $table->game_next(); $table->game_init(&$bri->user); -- 2.17.1