- $idx = $ghost;
- if (defined('CURL_DE_SAC_VERS')) {
- brisk_cds_execute($this, $ghost, $real_idx, $sess, $ip, $authenticate, $header);
- }
- return ($this->user[$ghost]);
- }
- else if ($idx != -1 && $i == MAX_PLAYERS) {
- /* SUCCESS */
- $curtime = time();
- if ($sess == "") {
- $sess = uniqid("");
- $this->user[$idx]->sess = $sess;
- }
- else {
- $this->user[$idx]->sess = $sess;
- }
- $this->user[$idx]->name = $name_new; // OK - add new user
- $this->user[$idx]->stat_set("room");
- $this->user[$idx]->step_set(0);
- while (array_pop($this->user[$idx]->comm) != NULL);
- $this->user[$idx]->subst = "standup";
- $this->user[$idx]->lacc = $curtime;
- $this->user[$idx]->laccwr = $curtime;
- $this->user[$idx]->bantime = 0;
- $this->user[$idx]->ip = $ip;
-
- $this->user[$idx]->rec = $authenticate;
- $this->user[$idx]->flags = $user_type;
- $this->user[$idx]->flags |= ($authenticate != FALSE ? USER_FLAG_AUTH : 0x00);
- $this->user[$idx]->flags |= ( ($pass != FALSE && $bdb == FALSE) ? USER_FLAG_DBFAILED : 0x00);
- log_auth("XXX", sprintf("FLAGS: [%x]", $this->user[$idx]->flags));
-
- if ($authenticate != FALSE) {
- $this->user[$idx]->code = $authenticate->code_get();
- if (0 == 1) {
- // all this part is included in the db server
- $this->user[$idx]->flags |= USER_FLAG_LISTAUTH;
-
- if (isset($cookie['CO_list'])) {
- fprintf(STDERR, "QQ: %s CO_list: [%s]\n", __FUNCTION__, $cookie['CO_list']);
- if (strcmp($cookie['CO_list'], "auth") == 0) {
- $this->user[$idx]->flags &= ~USER_FLAG_MAP_AUTH;
- $this->user[$idx]->flags |= USER_FLAG_LISTAUTH;
- }
- if (strcmp($cookie['CO_list'], "isolation") == 0) {
- $this->user[$idx]->flags &= ~USER_FLAG_MAP_AUTH;
- $this->user[$idx]->flags |= USER_FLAG_ISOLAUTH;
- }
- else {
- $this->user[$idx]->flags &= ~USER_FLAG_MAP_AUTH;
+ // If user at the table we need to update the table data too
+ $table_idx = $ghost_user->table;
+ if ($ghost_user->stat == "table" && $this->table[$table_idx]->player_n == PLAYERS_N) {
+ require_once("${G_base}briskin5/Obj/briskin5.phh");
+ if (isset($this->match[$table_idx])) {
+ $bin5 = $this->match[$table_idx];
+
+ if ($bin5->the_end != TRUE) {
+ $bin5->user[$ghost_user->table_pos]->comm[$bin5->user[$ghost_user->table_pos]->step % COMM_N] = "";
+ $bin5->user[$ghost_user->table_pos]->step_inc();
+ $bin5->user[$ghost_user->table_pos]->sess = $sess;