#
# Defaults
#
-CONFIG_FILE="$HOME/.brisk_spu_install"
+CONFIG_FILE="$HOME/.brisk_install"
apache_conf="/etc/apache2/sites-available/default"
players_n=3
$G_lng = langtolng($G_lang);
$G_all_points = array( 11,10,4,3,2, 0,0,0,0,0 );
-$G_brisk_version = "4.7.4";
+$G_brisk_version = "4.8.0";
/* MLANG: ALL THE INFO STRINGS IN brisk.phh */
$root_wellarr = array( 'it' => array ( 'Brisk (Ver. '.$G_brisk_version.'), <b>NOVITA\'</b>: prova il nuovo azioni->preferenze.',
function request_mgr(&$s_a_p, $header, &$header_out, &$new_socket, $path, $addr, $get, $post, $cookie)
{
+ GLOBAL $G_black_list;
+
printf("NEW_SOCKET (root): %d PATH [%s]\n", intval($new_socket), $path);
$enc = get_encoding($header);
static function request_mgr(&$s_a_p, $header, &$header_out, &$new_socket, $path, $addr, $get, $post, $cookie)
{
+ GLOBAL $G_black_list;
+
printf("NEW_SOCKET (root): %d\n", intval($new_socket));
$enc = get_encoding($header);
*/
function bin5_index_wr_main(&$bri, $remote_addr_full, $get, $post, $cookie)
{
- GLOBAL $G_base, $G_dbasetype;
+ GLOBAL $G_base, $G_dbasetype, $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 ($bri == NULL) {
return FALSE;
log_wr("Get User Error");
return FALSE;
}
+
+ if (array_search($user->ip, $G_black_list) !== FALSE) {
+ // TODO: waiting async 5 sec before close
+ return (FALSE);
+ }
+
$argz = explode('|', $mesg);
log_wr('POSTSPLIT: '.$argz[0].' user->stat: ['.$user->stat.']');
/* if the IP is banned, exit without do nothing */
if (array_search($remote_addr, $G_black_list) !== FALSE) {
- sleep(5);
+ // TODO: find a way to add a nonblocking sleep(5) here
return (FALSE);
}
// LACC UPDATED
$user->lacc = $curtime;
+ if (array_search($user->ip, $G_black_list) !== FALSE) {
+ // TODO: find a way to add a nonblocking sleep(5) here
+ return (FALSE);
+ }
+
if ($argz[0] == 'ping') {
log_wr("PING RECEIVED");
}