X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fbriskin5%2FObj%2Fbriskin5.phh;h=4acdec0b7be7092f50545e6be68d19c699ef95a5;hb=46b0825543d5a3ed5088ef7d9213f639a9dd8a63;hp=354637a26b58bc2a0c2502301b3590a7a4666d05;hpb=ec4358b73b2dc7b0367072ad77336a8ae5e2b5dd;p=brisk.git diff --git a/web/briskin5/Obj/briskin5.phh b/web/briskin5/Obj/briskin5.phh index 354637a..4acdec0 100644 --- a/web/briskin5/Obj/briskin5.phh +++ b/web/briskin5/Obj/briskin5.phh @@ -503,7 +503,7 @@ class Bin5_user extends User { } */ - function spawn($from, &$bri, $table, $table_pos, $get, $post, $cookie) + static function spawn($from, &$bri, $table, $table_pos, $get, $post, $cookie) { if (($thiz = new Bin5_user()) == FALSE) return (FALSE); @@ -525,7 +525,7 @@ class Bin5_user extends User { log_wr("Bin5 constructor"); - $this->privflags = ($CO_bin5_pref_ring_endauct == "true" ? BIN5_USER_FLAG_RING_ENDAUCT : 0) | 0; + $thiz->privflags = ($CO_bin5_pref_ring_endauct == "true" ? BIN5_USER_FLAG_RING_ENDAUCT : 0) | 0; $thiz->table_orig = $table; $thiz->table = 0; @@ -803,29 +803,6 @@ class Bin5 { var $delay_mgr; - static function page_manager($room, $header_out, $path, $method, $addr, $get, $post, $cookie) - { - switch ($path) { - case "": - case "index.php": - ob_start(); - bin5_index_main($room, $header_out, $addr, $get, $post, $cookie); - $content = ob_get_contents(); - ob_end_clean(); - - force_no_cache($header_out); - - $pgflush = new PageFlush($new_socket, $curtime, 20, $header_out, $content); - - if ($pgflush->try_flush($curtime) == FALSE) { - // Add $pgflush to the pgflush array - array_push($pages_flush, $pgflush); - } - break; - } - return TRUE; - } - function Bin5 ($room, $table_idx, $table_token, $get, $post, $cookie) { $this->user = array(); $this->table = array(); @@ -1025,7 +1002,7 @@ class Bin5 { if (($name_new = validate_name(substr($user_mesg, 6))) == FALSE) { $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; - $user->comm[$user->step % COMM_N] .= sprintf('chatt_sub("%s", [2, "%s"],"%s");', $dt, NICKSERV, $mlang_brisk['nickmust'][$G_lang]); + $user->comm[$user->step % COMM_N] .= sprintf('chatt_sub("%s", [2, 0, "%s"],"%s");', $dt, NICKSERV, $mlang_brisk['nickmust'][$G_lang]); $user->step_inc(); return; @@ -1044,7 +1021,7 @@ class Bin5 { $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; $premsg = sprintf($mlang_brisk['nickdupl'][$G_lang], xcape($name_new)); - $user->comm[$user->step % COMM_N] .= sprintf('chatt_sub("%s", [2, "%s"],"%s");', $dt, NICKSERV, $premsg); + $user->comm[$user->step % COMM_N] .= sprintf('chatt_sub("%s", [2, 0, "%s"],"%s");', $dt, NICKSERV, $premsg); $user->step_inc(); break; } @@ -1053,7 +1030,7 @@ class Bin5 { if ($user->flags & USER_FLAG_AUTH && strcasecmp($user->name,$name_new) != 0) { if ($this->table[$user->table]->auth_only == TRUE) { $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; - $user->comm[$user->step % COMM_N] .= sprintf('chatt_sub("%s", [2, "%s"],"%s");', $dt, NICKSERV, $mlang_brisk['authchan'][$G_lang]); + $user->comm[$user->step % COMM_N] .= sprintf('chatt_sub("%s", [2, 0, "%s"],"%s");', $dt, NICKSERV, $mlang_brisk['authchan'][$G_lang]); $user->step_inc(); return; } @@ -1113,8 +1090,8 @@ class Bin5 { } $user_cur->comm[$user_cur->step % COMM_N] = "gst.st = ".($user_cur->step+1)."; "; - $user_cur->comm[$user_cur->step % COMM_N] .= sprintf('chatt_sub("%s", [%d, "%s"],"%s");', - $dt, $user->flags, xcape($user->name), xcape($user_mesg)); + $user_cur->comm[$user_cur->step % COMM_N] .= sprintf('chatt_sub("%s", [%d, %d, "%s"],"%s");', + $dt, $user->flags, $user->flags_vlt, xcape($user->name), xcape($user_mesg)); $user_cur->step_inc(); } log_legal($curtime, $user->ip, $user, ($user->stat == 'room' ? 'room' : 'table '.$user->table_orig),$user_mesg); @@ -1176,6 +1153,8 @@ class Bin5 { 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); @@ -1207,7 +1186,7 @@ class Bin5 { $content = ob_get_contents(); ob_end_clean(); - $s_a_p->pgflush_try_add($enc, $new_socket, 20, $header_out, $content); + $s_a_p->pendpage_try_addflush($new_socket, 20, $enc, $header_out, $content); return TRUE; break; @@ -1227,7 +1206,7 @@ class Bin5 { else { $content = "Bin5 Load data error"; } - $s_a_p->pgflush_try_add($enc, $new_socket, 20, $header_out, $content); + $s_a_p->pendpage_try_addflush($new_socket, 20, $enc, $header_out, $content); return TRUE; break; @@ -1240,7 +1219,7 @@ class Bin5 { || (($user = $bri->get_user($cookie['sess'], $idx)) == FALSE)) { $content = Bin5_user::stream_fini($transp_type, $s_a_p->rndstr, TRUE); - $s_a_p->pgflush_try_add($enc, $new_socket, 20, $header_out, $content); + $s_a_p->pendpage_try_addflush($new_socket, 20, $enc, $header_out, $content); return TRUE; break; @@ -1269,7 +1248,7 @@ class Bin5 { fflush($new_socket); - $s_a_p->socks_set($new_socket, $user); + $s_a_p->socks_set($new_socket, $user, NULL); $user->rd_socket_set($new_socket); printf(" - qui ci siamo - "); return TRUE; @@ -1751,7 +1730,7 @@ function table_welcome($user) $ret = ""; for ($i = 0 ; $i < count($table_wellarr[$G_lang]) ; $i++) - $ret .= sprintf('chatt_sub("%s", [2, "ChanServ: "],"%s");', "", str_replace('"', '\"', $table_wellarr[$G_lang][$i])); + $ret .= sprintf('chatt_sub("%s", [2, 0, "ChanServ: "],"%s");', "", str_replace('"', '\"', $table_wellarr[$G_lang][$i])); return ($ret); }