X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fbriskin5%2FObj%2Fbriskin5.phh;h=75441be9c6bca8ff73e3a2c49ceab29ade43766a;hb=c3ccbbd5bc7c8534127fa10b4f88b81cffc6029a;hp=881bfa45cdf9953fdc4f67fe521897749120567b;hpb=e20771063d5274fedf3ce46d907599c8ec219251;p=brisk.git diff --git a/web/briskin5/Obj/briskin5.phh b/web/briskin5/Obj/briskin5.phh index 881bfa4..75441be 100644 --- a/web/briskin5/Obj/briskin5.phh +++ b/web/briskin5/Obj/briskin5.phh @@ -21,13 +21,13 @@ * Suite 330, Boston, MA 02111-1307, USA. * */ -define(BIN5_PLAYERS_N, 3); -define(BIN5_MAX_PLAYERS, BIN5_PLAYERS_N); -// define(BIN5_SHM_MIN, (50000 * BIN5_MAX_PLAYERS)); -define(BIN5_SHM_MIN, 32768); -define(BIN5_SHM_MAX, (BIN5_SHM_MIN + 1048576)); -define(BIN5_SHM_DLT, 32768); -define(BIN5_PROXY_PATH, PROXY_PATH."/bin5"); +define('BIN5_PLAYERS_N', 3); +define('BIN5_MAX_PLAYERS', BIN5_PLAYERS_N); +// define(BIN5_SHM_MIN', (50000 * BIN5_MAX_PLAYERS)); +define('BIN5_SHM_MIN', 32768); +define('BIN5_SHM_MAX', (BIN5_SHM_MIN + 1048576)); +define('BIN5_SHM_DLT', 32768); +define('BIN5_PROXY_PATH', PROXY_PATH."/bin5"); $mlang_bin5_bin5 = array( 'info_part' => array( 'it' => '
Nell\'ultima mano ha chiamato %s, il socio era %s,
', @@ -420,7 +420,7 @@ class Bin5_table extends Table { -define(BIN5_USER_FLAG_RING_ENDAUCT, 0x01); +define('BIN5_USER_FLAG_RING_ENDAUCT', 0x01); class Bin5_user extends User { var $asta_card; // @@ -1051,7 +1051,7 @@ class Bin5 { // if ($user_cur->sess == '' || $user_cur->stat != 'room') if ($user_cur->sess == '') continue; - if ($user_cur->name == $name_new) { + if (strcasecmp($user_cur->name, $name_new) == 0) { $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; $premsg = sprintf($mlang_brisk['nickdupl'][$G_lang], xcape($name_new)); @@ -1105,10 +1105,7 @@ class Bin5 { (BIN5_PLAYERS_N == 3 ? 0: $this->user[$table->player[($user_cur->table_pos+4) % BIN5_PLAYERS_N]]->flags), (BIN5_PLAYERS_N == 3 ? "" : xcape($this->user[$table->player[($user_cur->table_pos+4) % BIN5_PLAYERS_N]]->name))); if ($user_cur == $user) { - $itin = ($user->flags & USER_FLAG_AUTH ? "" : ""); - $itou = ($user->flags & USER_FLAG_AUTH ? "" : ""); - $user_cur->comm[$user_cur->step % COMM_N] .= sprintf('$("myname").innerHTML = "%s%s%s";', - $itin, xcape($user->name,ENT_COMPAT,"UTF-8"), $itou); + $user_cur->comm[$user_cur->step % COMM_N] .= $user_cur->myname_innerHTML(); } $user_cur->step_inc(); } @@ -1156,7 +1153,7 @@ class Bin5 { $user_cur->laccwr = $curtime; $ret = "gst.st = ".($user_cur->step+1)."; "; - $ret .= 'gst.st_loc++; the_end=true; window.onbeforeunload = null; window.onunload = null; document.location.assign("../index.php");|'; + $ret .= 'gst.st_loc++; hstm.stop(); window.onbeforeunload = null; window.onunload = null; document.location.assign("../index.php");|'; log_wr($user_cur->sess." BIN5_WAKEUP: ".$ret); $user_cur->comm[$user_cur->step % COMM_N] = $ret; @@ -1372,10 +1369,7 @@ function show_table(&$room, &$user, $sendstep, $is_transition, $is_again) $ret .= "background_set();"; /* USERS INFO */ - $itin = ($user->flags & USER_FLAG_AUTH ? "" : ""); - $itou = ($user->flags & USER_FLAG_AUTH ? "" : ""); - - $ret .= sprintf('$("myname").innerHTML = "%s%s%s";', $itin, xcape($user->name), $itou); + $ret .= $user->myname_innerHTML(); $ret .= sprintf('set_names([%d, "%s"], [%d, "%s"], [%d, "%s"], [%d, "%s"], [%d, "%s"]); ', $room->user[$table->player[($table_pos) % BIN5_PLAYERS_N]]->flags, xcape($room->user[$table->player[($table_pos) % BIN5_PLAYERS_N]]->name),