X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Findex_wr.php;h=dd2deb2f35d09805b72d44f38a84680435f521eb;hb=89ffa207cac53d9932f9bab42170ec03d9274ffa;hp=8a59ec512e053a2f2a8953134d02eefd9d04f257;hpb=7a9493d9c85c2ed4e0ab56a101f16b8d3d817f13;p=brisk.git
diff --git a/web/index_wr.php b/web/index_wr.php
index 8a59ec5..dd2deb2 100644
--- a/web/index_wr.php
+++ b/web/index_wr.php
@@ -94,10 +94,20 @@ else if ($user->stat == 'room') {
exit;
}
+ if ($user->bantime > $user->laccwr) {
+ $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; ";
+ $user->comm[$user->step % COMM_N] .= show_notify("
Ti sei alzato da un tavolo senza il consenso degli altri giocatori. Dovrai aspettare ancora ".secstoword($user->bantime - $user->laccwr)." prima di poterti sedere nuovamente.", 2000, "Torna in piedi.", 400, 100);
+
+ $user->step++;
+ save_data($bri);
+ unlock_data($sem);
+ exit;
+ }
+
// Take parameters
$table_idx = $argz[1];
$table = &$bri->table[$table_idx];
-
+
if ($table->player_n == PLAYERS_N) {
log_wr($sess, "Warning ! unreachable, table full.");
unlock_data($sem);
@@ -174,7 +184,32 @@ else if ($user->stat == 'table') {
$bri->chatt_send(&$user,$mesg);
}
else if ($argz[0] == 'logout') {
- $bri->room_wakeup(&$user);
+ $remcalc = $argz[1];
+
+ if ($user->exitislock == TRUE) {
+ $remcalc++;
+ $user->exitislock = FALSE;
+ }
+
+ $logout_cont = TRUE;
+ if ($remcalc >= 3) {
+ $lockcalc = $table->exitlock_calc(&$bri->user, $user->table_pos);
+ if ($lockcalc < 3) {
+ $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; ";
+ $user->comm[$user->step % COMM_N] .= $table->exitlock_show(&$bri->user, $user->table_pos);
+ $user->comm[$user->step % COMM_N] .= show_notify("
I dati presenti sul server non erano allineati con quelli inviati dal tuo browser, adesso lo sono. Riprova ora.", 2000, "Torna alla partita.", 400, 100);
+
+ log_wr($sess, $user->comm[$user->step % COMM_N]);
+ $user->step++;
+ $logout_cont = FALSE;
+ }
+ }
+ else
+ $user->bantime = $user->laccwr + BAN_TIME;
+
+ if ($logout_cont == TRUE) {
+ $bri->room_wakeup(&$user);
+ }
}
else if ($argz[0] == 'exitlock') {
$user->exitislock = ($user->exitislock == TRUE ? FALSE : TRUE);
@@ -185,7 +220,7 @@ else if ($user->stat == 'table') {
}
for ($i = 0 ; $i < PLAYERS_N ; $i++) {
$ret = sprintf('gst.st = %d;', $user_cur[$i]->step+1);
- $ret = sprintf('exitlock_show(%d, %s);', $ct,
+ $ret .= sprintf('exitlock_show(%d, %s);', $ct,
($user_cur[$i]->exitislock ? 'true' : 'false'));
$user_cur[$i]->comm[$user_cur[$i]->step % COMM_N] = $ret;
log_wr($sess, $user_cur[$i]->comm[$user_cur[$i]->step % COMM_N]);