- }
-
- $idx = $ghost;
- if (defined('CURL_DE_SAC_VERS')) {
- brisk_cds_execute($this, $ghost, $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;
- }