projects
/
brisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
698268d
)
pre-merge into master
v4.8.0
author
Matteo Nastasi
<nastasi@alternativeoutput.it>
Sun, 17 Mar 2013 15:40:23 +0000
(16:40 +0100)
committer
Matteo Nastasi
<nastasi@alternativeoutput.it>
Sun, 17 Mar 2013 15:40:23 +0000
(16:40 +0100)
INSTALL.sh
patch
|
blob
|
history
web/Obj/brisk.phh
patch
|
blob
|
history
web/briskin5/Obj/briskin5.phh
patch
|
blob
|
history
web/briskin5/index_wr.php
patch
|
blob
|
history
web/index_wr.php
patch
|
blob
|
history
diff --git
a/INSTALL.sh
b/INSTALL.sh
index
65074c8
..
a44e319
100755
(executable)
--- a/
INSTALL.sh
+++ b/
INSTALL.sh
@@
-3,7
+3,7
@@
#
# Defaults
#
#
# Defaults
#
-CONFIG_FILE="$HOME/.brisk_
spu_
install"
+CONFIG_FILE="$HOME/.brisk_install"
apache_conf="/etc/apache2/sites-available/default"
players_n=3
apache_conf="/etc/apache2/sites-available/default"
players_n=3
diff --git
a/web/Obj/brisk.phh
b/web/Obj/brisk.phh
index
90df86f
..
6bdcb84
100644
(file)
--- a/
web/Obj/brisk.phh
+++ b/
web/Obj/brisk.phh
@@
-141,7
+141,7
@@
$mlang_brisk = array( 'btn_backstand'=> array( 'it' => 'torna in piedi',
$G_lng = langtolng($G_lang);
$G_all_points = array( 11,10,4,3,2, 0,0,0,0,0 );
$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.',
/* 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.',
@@
-2297,6
+2297,8
@@
class Room
function request_mgr(&$s_a_p, $header, &$header_out, &$new_socket, $path, $addr, $get, $post, $cookie)
{
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);
printf("NEW_SOCKET (root): %d PATH [%s]\n", intval($new_socket), $path);
$enc = get_encoding($header);
diff --git
a/web/briskin5/Obj/briskin5.phh
b/web/briskin5/Obj/briskin5.phh
index
008d85c
..
10edf1b
100644
(file)
--- a/
web/briskin5/Obj/briskin5.phh
+++ b/
web/briskin5/Obj/briskin5.phh
@@
-1153,6
+1153,8
@@
class Bin5 {
static function request_mgr(&$s_a_p, $header, &$header_out, &$new_socket, $path, $addr, $get, $post, $cookie)
{
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);
printf("NEW_SOCKET (root): %d\n", intval($new_socket));
$enc = get_encoding($header);
diff --git
a/web/briskin5/index_wr.php
b/web/briskin5/index_wr.php
index
9f9764f
..
98fd79b
100644
(file)
--- a/
web/briskin5/index_wr.php
+++ b/
web/briskin5/index_wr.php
@@
-40,10
+40,15
@@
require_once("Obj/briskin5.phh");
*/
function bin5_index_wr_main(&$bri, $remote_addr_full, $get, $post, $cookie)
{
*/
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);
$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;
$curtime = time();
if ($bri == NULL) {
return FALSE;
@@
-71,6
+76,12
@@
function bin5_index_wr_main(&$bri, $remote_addr_full, $get, $post, $cookie)
log_wr("Get User Error");
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.']');
$argz = explode('|', $mesg);
log_wr('POSTSPLIT: '.$argz[0].' user->stat: ['.$user->stat.']');
diff --git
a/web/index_wr.php
b/web/index_wr.php
index
8571c76
..
5b05c68
100644
(file)
--- a/
web/index_wr.php
+++ b/
web/index_wr.php
@@
-105,7
+105,7
@@
function index_wr_main(&$room, $remote_addr_full, $get, $post, $cookie)
/* if the IP is banned, exit without do nothing */
if (array_search($remote_addr, $G_black_list) !== FALSE) {
/* 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);
}
return (FALSE);
}
@@
-199,6
+199,11
@@
function index_wr_main(&$room, $remote_addr_full, $get, $post, $cookie)
// LACC UPDATED
$user->lacc = $curtime;
// 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");
}
if ($argz[0] == 'ping') {
log_wr("PING RECEIVED");
}