From: Matteo Nastasi Date: Sun, 16 Jul 2017 15:44:27 +0000 (+0200) Subject: Merge branch 'together-for-fun' into nginx X-Git-Tag: v5.6.0~24 X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=a16d8054d9577795a6d9306570eb3a06c46da147;hp=828872a069b4092703067ee5df3d4cc8bbb334ca;p=brisk.git Merge branch 'together-for-fun' into nginx --- diff --git a/INSTALL.sh b/INSTALL.sh index 1966c41..5391cae 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -431,7 +431,7 @@ sed -i "s@var \+cookiepath \+= \+\"[^\"]*\";@var cookiepath = \"$prefix_path\";@ sed -i "s@\( \+cookiepath *: *\)\"[^\"]*\" *,@\1 \"$prefix_path\",@g" ${web_path}__/xynt-streaming.js document_root="$(grep DocumentRoot "${apache_conf}" | grep -v '^[ ]*#' | awk '{ print $2 }')" -sed -i "s@^\(\$DOCUMENT_ROOT *= *[\"']\)[^\"']*\([\"']\)@\1$document_root\2@g" ${web_path}__/spush/*.ph* +sed -i "s@^\(\$DOCUMENT_ROOT *= *[\"']\)[^\"']*\([\"']\)@\1$document_root\2@g" ${web_path}__/spush/*.ph* ${web_path}__/donometer.php if [ -d ../brisk-img ]; then cd ../brisk-img diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index c89d6ac..62fc1a4 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -153,10 +153,10 @@ $mlang_brisk = array( 'btn_backstand'=> array( 'it' => 'torna in piedi', $G_lng = langtolng($G_lang); $G_all_points = array( 11,10,4,3,2, 0,0,0,0,0 ); -$G_brisk_version = "5.4.1"; +$G_brisk_version = "5.4.2"; /* MLANG: ALL THE INFO STRINGS IN brisk.phh */ -$root_wellarr = array( 'it' => array ( 'Brisk (Ver. '.$G_brisk_version.'), NOVITA\': potete scegliere che regole usare per giocare dal menu "Prefs" al tavolo, descrizioni più consistenti.', +$root_wellarr = array( 'it' => array ( 'Brisk (Ver. '.$G_brisk_version.'), NOVITA\': uscita più veloce dal sito.', 'Se vuoi iscriverti alla Mailing List, cliccala!' ), 'en' => array ( 'EN Brisk (Ver. '.$G_brisk_version.'), NOVITA\': puoi creare la tua rete di amicizie con /info,', 'vedere cosa pensano i tuoi amici degli altri utenti e tavoli riservati per registrati e apprendisti.', @@ -1226,10 +1226,15 @@ class Brisk function users_cleanup() { + $curtime = time(); for ($i = 0 ; $i < MAX_PLAYERS ; $i++) { $user_cur = $this->user[$i]; - if ($user_cur->the_end) { + if ($user_cur->the_end + && (($user_cur->rd_toflush == FALSE + && $user_cur->rd_step == $user_cur->step) + || $user_cur->rd_endtime_is_expired($curtime)) + ) { $user_cur->reset(); // users_cleanup, OK } } diff --git a/web/Obj/sac-a-push.phh b/web/Obj/sac-a-push.phh index 46227fc..05c24ce 100644 --- a/web/Obj/sac-a-push.phh +++ b/web/Obj/sac-a-push.phh @@ -631,14 +631,18 @@ class Sac_a_push { foreach ($this->socks as $k => $sock) { $id = intval($sock); if (isset($this->s2u[$id])) { - if ($this->s2u[$id]->the_end) { - if ($this->s2u[$id]->rd_socket_get() != NULL) { - $this->s2u[$id]->rd_socket_set(NULL); + $user = $this->s2u[$id]; + if ($user->the_end) { + if (($user->rd_toflush == FALSE && $user->rd_step == $user->step) + || $user->rd_endtime_is_expired($this->curtime)) { + if ($user->rd_socket_get() != NULL) { + $user->rd_socket_set(NULL); + } + unset($this->socks[$id]); + unset($this->s2u[$id]); + fclose($sock); + printf("CLOSE ON GARBAGE MANAGER\n"); } - unset($this->socks[$id]); - unset($this->s2u[$id]); - fclose($sock); - printf("CLOSE ON GARBAGE MANAGER\n"); } } } diff --git a/web/briskin5/index_wr.php b/web/briskin5/index_wr.php index 19ac735..d188c0f 100644 --- a/web/briskin5/index_wr.php +++ b/web/briskin5/index_wr.php @@ -189,7 +189,7 @@ function bin5_index_wr_main(&$bin5, $remote_addr_full, $get, $post, $cookie) if ($user->table_pos != $index_cur || !$table->asta_pla[$index_cur]) { // FIXME_LANG - $ret_s = 'grave inconsistenza'; + // $ret_s = 'grave inconsistenza'; break; } diff --git a/web/donometer.php b/web/donometer.php index 76e5091..98a9895 100644 --- a/web/donometer.php +++ b/web/donometer.php @@ -23,6 +23,7 @@ */ $G_base = ""; +$DOCUMENT_ROOT=""; require_once("Obj/brisk.phh"); diff --git a/web/index_wr.php b/web/index_wr.php index 48b3c14..002a76e 100644 --- a/web/index_wr.php +++ b/web/index_wr.php @@ -956,16 +956,13 @@ function index_wr_main(&$brisk, $remote_addr_full, $get, $post, $cookie) } else if ($argz[0] == 'logout') { $brisk->ghost_sess->push($curtime, $user->sess, GHOST_SESS_REAS_LOUT); + $user->the_end = TRUE; + $brisk->room_outstandup($user); - if ($user->subst == 'sitdown') { - log_load("ROOM WAKEUP"); - $brisk->room_wakeup($user); - } - else if ($user->subst == 'standup') - $brisk->room_outstandup($user); - else - log_rd2("LOGOUT FROM WHAT ???"); + $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; + $user->comm[$user->step % COMM_N] .= sprintf('gst.st_loc++; xstm.stop(); window.onbeforeunload = null; window.onunload = null; document.location.assign("index.php");'); + $user->step_inc(); } } /********************** @@ -984,9 +981,13 @@ function index_wr_main(&$brisk, $remote_addr_full, $get, $post, $cookie) } else if ($argz[0] == 'logout') { $brisk->ghost_sess->push($curtime, $user->sess, GHOST_SESS_REAS_LOUT); - $user->the_end = TRUE; + $user->the_end = TRUE; $brisk->room_wakeup($user); + + $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; + $user->comm[$user->step % COMM_N] .= sprintf('gst.st_loc++; xstm.stop(); window.onbeforeunload = null; window.onunload = null; document.location.assign("index.php");'); + $user->step_inc(); } } }