$G_base = "../";
require_once("../Obj/brisk.phh");
-// require_once("../Obj/proxyscan.phh");
require_once("Obj/briskin5.phh");
-// Use of proxies isn't allowed.
-// if (is_proxy()) {
-// sleep(5);
-// exit;
-//}
-
/*
* MAIN
*/
function bin5_index_wr_main(&$bin5, $remote_addr_full, $get, $post, $cookie)
{
- GLOBAL $G_base, $G_dbasetype, $G_black_list;
+ GLOBAL $G_base, $G_dbasetype, $G_ban_list, $G_black_list;
$remote_addr = addrtoipv4($remote_addr_full);
- if (array_search($remote_addr, $G_black_list) !== FALSE) {
- // TODO: waiting async 5 sec before close
- return (FALSE);
- }
-
$curtime = time();
if ($bin5 == NULL) {
return FALSE;
return FALSE;
}
$bin5->brisk->sess_cur_set($user->sess);
- if (array_search($user->ip, $G_black_list) !== FALSE) {
+ if ( ( ! $user->is_auth() ) &&
+ $bin5->brisk->ban_check($user->ip)) {
// TODO: waiting async 5 sec before close
return (FALSE);
}
}
else {
require_once("../Obj/hardban.phh");
- Hardbans::add(($user->flags & USER_FLAG_AUTH ? $user->name : FALSE),
+ Hardbans::add(($user->is_auth() ? $user->name : FALSE),
$user->ip, $user->sess, $user->laccwr + BAN_TIME);
}
// $user->bantime = $user->laccwr + BAN_TIME;
if ($logout_cont == TRUE) {
- $bin5->table_wakeup(&$user);
+ $bin5->table_wakeup($user);
}
}
else if ($argz[0] == 'exitlock') {
log_wr("NOSENSE");
}
}
- log_wr("before save data");
- log_wr($user->step, 'bin::index_wr.php: after save_data()');
return TRUE;
}
?>