$subs = "briskin5/";
$subs_l = strlen($subs);
if (!strncmp($path, $subs, $subs_l)) {
- $ret = Bin5::request_mgr(&$s_a_p, $header, &$header_out, &$new_socket, substr($path, $subs_l) , $addr, $get, $post, $cookie);
+ $ret = Bin5::request_mgr($s_a_p, $header, $header_out, $new_socket, substr($path, $subs_l) , $addr, $get, $post, $cookie);
return ($ret);
}
break;
}
if ($chals->ismod()) {
- Challenges::save_data(&$chals);
+ Challenges::save_data($chals);
}
Challenges::unlock_data($a_sem);
}
if ($chals->ismod()) {
- Challenges::save_data(&$chals);
+ Challenges::save_data($chals);
}
Challenges::unlock_data($a_sem);
}
} // for (...
if ($hban->ismod()) {
- Hardbans::save_data(&$hban);
+ Hardbans::save_data($hban);
}
} // if (load_data
Hardbans::unlock_data($a_sem);
$hban->add_item($login, $ip, $session, $timeout);
if ($hban->ismod()) {
- Hardbans::save_data(&$hban);
+ Hardbans::save_data($hban);
}
} // if (load_data
Hardbans::unlock_data($a_sem);
function pendpage_try_addcont(&$new_socket, $tout, $method, $header, $get, $post, $cookie, $path, $addr, $rest, $cont)
{
- $pendpage = PendingPage::pendingpage_continue(&$new_socket, $this->curtime, $tout, $method,
+ $pendpage = PendingPage::pendingpage_continue( $new_socket, $this->curtime, $tout, $method,
$header, $get, $post, $cookie,
$path, $addr, $rest, $cont);
return cmd_return(401, 'malformed cmd');
}
$idx = -1;
- if (($user = $this->app->get_user($cmd['sess'], &$idx)) == FALSE)
+ if (($user = $this->app->get_user($cmd['sess'], $idx)) == FALSE)
return cmd_return(402, 'user not found');
if (($user->flags & USER_FLAG_TY_ADMIN) == 0x00)
$this->rd_data_set($curtime, $transp, $enc, $stat, $subst, $step, $from);
- $ret = $this->rd_transp->init($enc, $header, &$header_out, $init_string, self::base_get(), $this->rd_scristp);
+ $ret = $this->rd_transp->init($enc, $header, $header_out, $init_string, self::base_get(), $this->rd_scristp);
if ($ret === FALSE) {
return FALSE;
$game_delta = 1;
// $this->game_next(1);
- $this->game_init(&$bri->user);
+ $this->game_init($bri->user);
}
else if ($action == BIN5_RULES_ABANDON) { // return TRUE if all correct
if (!($user->handpt <= 2)) {
// Non si cambia mazzo se si abbandona la partita
$game_delta = 0;
// $this->game_next(0);
- $this->game_init(&$bri->user);
+ $this->game_init($bri->user);
}
else if ($action == BIN5_RULES_FINISH) { // return TRUE if all correct
$this->old_act = $action;
log_points($user->ip, $curtime, $user, "STAT:BRISKIN5:FINISH_GAME", $plist);
}
- $this->game_init(&$bri->user);
+ $this->game_init($bri->user);
return (TRUE);
}
$this->mazzo = $match_data['mazzo_next'];
$this->mult = $match_data['mult_next'];
$this->match_id = $match_id;
- $this->game_init(&$bri->user);
+ $this->game_init($bri->user);
/* reload of the page with the new layout */
for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
$user_cur->comm[$user_cur->step % COMM_N] = "";
$user_cur->step_inc();
- $user_cur->comm[$user_cur->step % COMM_N] = show_table(&$bri, &$user_cur, $user_cur->step+1, TRUE, FALSE);
+ $user_cur->comm[$user_cur->step % COMM_N] = show_table($bri, $user_cur, $user_cur->step+1, TRUE, FALSE);
$user_cur->step_inc();
}
return (TRUE);
log_load("RESYNC");
/* NOTE: $this->room is associated with the current $bri object */
printf("xXx CLASS NAME [%s]\n", get_class($this->room));
- $ret = show_table(&$this->room, $this, $this->step, FALSE, FALSE);
+ $ret = show_table($this->room, $this, $this->step, FALSE, FALSE);
}
log_rd2("NEWSTAT: ".$this->stat);
$user[$table->player[$i]]->table_token = $table_token;
$this->user[$i] = Bin5_user::spawn($user[$table->player[$i]], $this, $table_idx, $i, $get, $post, $cookie);
}
- $this->table[0] = Bin5_table::spawn(&$table);
+ $this->table[0] = Bin5_table::spawn($table);
log_main("TABLE_OLD_WIN - Bin5:".$this->table[0]->old_asta_win);
$user_cur->the_end = TRUE;
/* se gli altri utenti non erano d'accordo questo utente viene bannato */
- $remcalc = $this->table[0]->exitlock_calc(&$this->user, $user_cur->table_pos);
+ $remcalc = $this->table[0]->exitlock_calc($this->user, $user_cur->table_pos);
if ($remcalc < 3) {
require_once("${G_base}Obj/hardban.phh");
Hardbans::add(($user_cur->is_auth() ? $user_cur->name : FALSE),
$table_pos = $user->table_pos;
$ret = "table_init();";
- $ret .= $table->exitlock_show(&$bri->user, $table_pos);
+ $ret .= $table->exitlock_show($bri->user, $table_pos);
if (!$is_again) {
/* GENERAL STATUS */
$ret .= sprintf( 'gst.st = %d; stat = "%s"; subst = "%s"; table_pos = %d;',
}
/* NOTIFY FOR THE CARD MAKER */
if ($is_transition) { // && $user->subst == "asta" superfluo
- $ret .= show_table_info(&$bri, &$table, $table_pos);
+ $ret .= show_table_info($bri, $table, $table_pos);
$ret .= "setTimeout(preload_images, 500, g_preload_img_arr, g_imgct);";
}
else {
log_wr(0, 'bin::index_wr.php: COMM: '.xcapemesg($mesg));
- if (($user = &$bin5->get_user($sess, &$idx)) == FALSE) {
+ if (($user = &$bin5->get_user($sess, $idx)) == FALSE) {
echo "Get User Error";
log_wr("Get User Error");
return FALSE;
if ($argz[0] == 'tableinfo') {
log_wr("PER DI TABLEINFO");
$user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; ";
- $user->comm[$user->step % COMM_N] .= show_table_info(&$bin5, &$table, $user->table_pos);
+ $user->comm[$user->step % COMM_N] .= show_table_info($bin5, $table, $user->table_pos);
log_wr($user->comm[$user->step % COMM_N]);
$user->step_inc();
}
else if ($argz[0] == 'chatt') {
- $bin5->chatt_send(&$user,$mesg);
+ $bin5->chatt_send($user, $mesg);
}
else if ($argz[0] == 'preferences_update') {
log_wr("PER DI PREFERENCES_UPDATE");
$logout_cont = TRUE;
if ($remcalc >= 3) {
- $lockcalc = $table->exitlock_calc(&$bin5->user, $user->table_pos);
+ $lockcalc = $table->exitlock_calc($bin5->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(&$bin5->user, $user->table_pos);
+ $user->comm[$user->step % COMM_N] .= $table->exitlock_show($bin5->user, $user->table_pos);
$user->comm[$user->step % COMM_N] .= show_notify("<br>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($user->comm[$user->step % COMM_N]);
/* $table->game_init(&$bin5->user); */
- if ($table->rules_engine(&$bin5, $curtime, BIN5_RULES_ABANDON, $user)) {
+ if ($table->rules_engine($bin5, $curtime, BIN5_RULES_ABANDON, $user)) {
for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
$user_cur = &$bin5->user[$table->player[$i]];
$ret = sprintf('gst.st = %d;', $user_cur->step+1);
- $ret .= show_table(&$bin5,&$user_cur,$user_cur->step+1, TRUE, TRUE);
+ $ret .= show_table($bin5, $user_cur,$user_cur->step+1, TRUE, TRUE);
$user_cur->comm[$user_cur->step % COMM_N] = $ret;
$user_cur->step_inc();
}
else if ($table->asta_pla_n == 0) {
log_wr("PASSANO TUTTI!");
- if ($table->rules_engine(&$bin5, $curtime, BIN5_RULES_ALLPASS, $user)) {
+ if ($table->rules_engine($bin5, $curtime, BIN5_RULES_ALLPASS, $user)) {
for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
$user_cur = &$bin5->user[$table->player[$i]];
$ret = sprintf('gst.st = %d;', $user_cur->step+1);
- $ret .= show_table(&$bin5,&$user_cur,$user_cur->step+1, TRUE, TRUE);
+ $ret .= show_table($bin5, $user_cur,$user_cur->step+1, TRUE, TRUE);
$user_cur->comm[$user_cur->step % COMM_N] = $ret;
$user_cur->step_inc();
}
if ($table->turn == (BIN5_PLAYERS_N * BIN5_CARD_HAND)) { /* game finished */
log_wr(sprintf("GIOCO FINITO !!!"));
- if ($table->rules_engine(&$bin5, $curtime, BIN5_RULES_FINISH, $user)) {
+ if ($table->rules_engine($bin5, $curtime, BIN5_RULES_FINISH, $user)) {
for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
$user_cur = &$bin5->user[$table->player[$i]];
- $retar[$i] .= show_table(&$bin5,&$user_cur,$user_cur->step+1,TRUE, TRUE);
+ $retar[$i] .= show_table($bin5, $user_cur, $user_cur->step+1, TRUE, TRUE);
}
}
}
$user_cur->step_inc();
}
- log_wr(sprintf("TURN: %d",$table->turn));
+ log_wr(sprintf("TURN: %d", $table->turn));
/* Have played all the players ? */
/* NO: switch the focus and enable the next player to play. */
for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
// echo $p." i) ".$i."<br>";
$username = $ar[9+($i*2)];
- if (($item = $bdb->getitem_bylogin($username, &$id)) == FALSE) {
+ if (($item = $bdb->getitem_bylogin($username, $id)) == FALSE) {
echo "WARNING: the user [".$username."] NOT EXISTS!<br>";
continue;
}
for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
// echo $p." i) ".$i."<br>";
$username = $ar[9+($i*2)];
- if (($item = $bdb->getitem_bylogin($username, &$id)) == FALSE) {
+ if (($item = $bdb->getitem_bylogin($username, $id)) == FALSE) {
echo "WARNING: the user [".$username."] NOT EXISTS!<br>";
continue;
}
log_main("pre garbage_manager UNO");
$brisk->garbage_manager(TRUE);
log_main("post garbage_manager");
- if (($user = &$brisk->get_user($sess, &$idx)) != FALSE) {
+ if (($user = $brisk->get_user($sess, $idx)) != FALSE) {
if ($user->the_end == FALSE) {
$brisk->sess_cur_set($user->sess);
log_main("user stat: ".$user->stat);
/* try login */
if ($banned == FALSE &&
- ($user = $brisk->add_user(&$sess, &$idx, $name, $pass_private,
+ ($user = $brisk->add_user($sess, $idx, $name, $pass_private,
$remote_addr, $header, $cookie)) != FALSE) {
$brisk->sess_cur_set($user->sess);
$ACTION = "room";
$curtime = time();
$dt = date("H:i ", $curtime);
- if (($user = $brisk->get_user($sess, &$idx)) == FALSE) {
+ if (($user = $brisk->get_user($sess, $idx)) == FALSE) {
$argz = explode('|', xcapemesg($mesg));
if ($argz[0] == 'getchallenge') {
echo '1|';
}
if ($chals->ismod()) {
- Challenges::save_data(&$chals);
+ Challenges::save_data($chals);
}
}
if ($user->subst == 'sitdown' || $user->stat == 'table')
$brisk->room_wakeup($user);
else if ($user->subst == 'standup')
- $brisk->room_outstandup(&$user);
+ $brisk->room_outstandup($user);
else {
log_rd2("SHUTDOWN FROM WHAT ???");
}
}
else if ($argz[0] == 'chatt') {
- $brisk->chatt_send(&$user, xcapemesg($mesg));
+ $brisk->chatt_send($user, xcapemesg($mesg));
}
else if ($argz[0] == 'tosmgr') {
// check IF is authnticated user, both terms of service versions matches
$bin5_user_cur->trans_step = $user_cur->step + 1;
$bin5_user_cur->comm[$bin5_user_cur->step % COMM_N] = "";
$bin5_user_cur->step_inc();
- $bin5_user_cur->comm[$bin5_user_cur->step % COMM_N] = show_table(&$bin5,&$bin5_user_cur,$bin5_user_cur->step+1,TRUE,FALSE);
+ $bin5_user_cur->comm[$bin5_user_cur->step % COMM_N] = show_table($bin5, $bin5_user_cur,
+ $bin5_user_cur->step+1,
+ TRUE, FALSE);
$bin5_user_cur->step_inc();
log_wr("TRY PRESAVE: ".$bin5_user_cur->step." TRANS STEP: ".$bin5_user_cur->trans_step);