+
+ $thiz->reload(TRUE, $ban_list, $black_list, $cloud_smasher);
+
+ return ($thiz);
+ }
+
+ function reload($is_first, $ban_list, $black_list, $cloud_smasher)
+ {
+ fprintf(STDERR, "RELOAD STUFF (%d)(%d)(%d)\n",
+ count($ban_list), count($black_list), count($cloud_smasher));
+
+ if (defined('CURL_DE_SAC_VERS')) {
+ if (brisk_cds_reload($this) == FALSE) {
+ exit(12);
+ }
+ }
+ $this->ban_list->update($ban_list);
+ $this->black_list->update($black_list);
+ $this->cloud_smasher->update($cloud_smasher);
+
+ if (!$is_first) {
+ $this->banned_kickoff();
+ $this->garbage_manager(TRUE);
+ }
+ }
+
+ function banned_kickoff()
+ {
+ $is_ban = FALSE;
+
+ for ($table_idx = 0 ; $table_idx < TABLES_N ; $table_idx++) {
+ $table_cur = $this->table[$table_idx];
+ // if the table is complete and exists we check users IP
+
+ if ($table_cur->player_n == PLAYERS_N) {
+ if (isset($this->match[$table_idx]) &&
+ $table_cur->table_token == $bin5->table_token) {
+ log_main("PLAYERS == N TABLE ".$table_idx);
+
+ $bin5 = $this->match[$table_idx];
+
+ $is_ban |= $bin5->banned_kickoff();
+ }
+ }
+ }
+
+ for ($i = 0 ; $i < MAX_PLAYERS ; $i++) {
+ $user_cur = $this->user[$i];
+
+ if ($user_cur->is_active() == FALSE)
+ continue;
+
+ // check if the IP is blacklisted
+ if ($this->black_check($user_cur->ip) ||
+ $this->cloud_check($user_cur->ip)) {
+ $user_cur->lacc = 0;
+ $is_ban = TRUE;
+ continue;
+ }
+
+ // if authorized not check if banlisted
+ if ($user_cur->is_auth()) {
+ continue;
+ }
+
+ if ($this->ban_check($user_cur->ip)) {
+ $user_cur->lacc = 0;
+ $is_ban = TRUE;
+ }
+ }
+
+ return $is_ban;
+ }
+
+ function ban_check($ip_str)
+ {
+ return ($this->ban_list->check($ip_str));
+ }
+
+ function black_check($ip_str)
+ {
+ return ($this->black_list->check($ip_str));
+ }
+
+ function cloud_check($ip_str)
+ {
+ return ($this->cloud_smasher->check($ip_str));
+ }
+
+ function users_cleanup()
+ {
+ for ($i = 0 ; $i < MAX_PLAYERS ; $i++) {
+ $user_cur = $this->user[$i];
+
+ if ($user_cur->the_end) {
+ $user_cur->reset(); // users_cleanup, OK
+ }
+ }