X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fbrisk.phh;h=eeac879b7df9dd04b6fd7011ad57407d4efdbec1;hb=b1f99ee20cc9d9bafc1811aaca227909cccba904;hp=bc65746240f0b557d5de4419ee2957b648acc98c;hpb=e246dc1e59ed187a121f0cae319881f40e1fd426;p=brisk.git diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index bc65746..eeac879 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -984,7 +984,11 @@ class Client_prefs { } define('GHOST_SESS_TOUT', 300); -define('GHOST_SESS_REAS_ANOT', 1); +define('GHOST_SESS_REAS_LOUT', 1); // logout +define('GHOST_SESS_REAS_ANOT', 2); // another user get session +define('GHOST_SESS_REAS_TOUT', 3); // room timeout +define('GHOST_SESS_REAS_TTOT', 4); // table timeout + class GhostSessEl { var $time; @@ -1315,6 +1319,9 @@ class Brisk $user_cur->laccwr = $bin5_user->lacc; $user_cur->bantime = $bin5_user->bantime; $user_cur->the_end = $bin5_user->the_end; + if ($user_cur->the_end) { + $this->ghost_sess->push($curtime, $user_cur->sess, GHOST_SESS_REAS_TTOT); + } } log_legal($curtime, $user_cur->ip, $user_cur, "STAT:DESTROY_GAME", $plist); @@ -1377,6 +1384,7 @@ class Brisk // Auto logout dell'utente log_rd2("AUTO LOGOUT.".($user_cur->lacc + EXPIRE_TIME_RD)." curtime - delta ".($curtime - $delta)); + $this->ghost_sess->push($curtime, $user_cur->sess, GHOST_SESS_REAS_TOUT); $user_cur->the_end = TRUE; log_rd2("AUTO LOGOUT."); @@ -1859,6 +1867,37 @@ class Brisk /* for old isolation management $is_ticker = TRUE; */ } while (0); } // /tav chat command + // just for development use currently + else if (FALSE && strncmp($msg, "/out ", 5) == 0) { + fprintf(STDERR, "MOP OUT\n"); + $target = substr($msg, 5); + for ($i = 0 ; $i < MAX_PLAYERS ; $i++) { + $user_out = $this->user[$i]; + if (!strcmp($user_out->name, $target)) { + + $user_out->the_end = TRUE; + fprintf(STDERR, "MOP: GHOST_SESS: %d\n", GHOST_SESS_REAS_LOUT); + $this->ghost_sess->push($curtime, $user_out->sess, GHOST_SESS_REAS_LOUT); + + if ($user_out->stat == 'table' || $user_out->stat == 'room') { + if ($user_out->subst == 'sitdown' || $user_out->stat == 'table') { + $this->room_wakeup($user_out); + } + else if ($user_out->subst == 'standup') { + $this->room_outstandup($user_out); + } + else { + log_rd2("LOGOUT FROM WHAT ???"); + } + } + + fprintf(STDERR, "MOP: OUT FIND [%s] step %d rd_step %d\n", $target, $user_out->step, $user_out->rd_step); + break; + } + } + } + + else if (strncmp($msg, "/alarm ", 7) == 0) { if (strncmp($msg, "/alarm to ", 10) == 0) { @@ -2351,7 +2390,7 @@ class Brisk $idx = $ghost; if (defined('CURL_DE_SAC_VERS')) { - brisk_cds_execute($this, $ghost, $real_idx, $sess, $ip, $authenticate, $header); + brisk_cds_execute($this, $ghost, $idx, $sess, $ip, $authenticate, $header); } return ($this->user[$ghost]); }