X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fbrisk.phh;h=41524d291989e5b2dfa9caffdbd52415b36a5b1f;hb=7bb29caf1761665d81089090d1df1153b5d2bab9;hp=60ea624337ec29859571c86f27d06dd3c861a69b;hpb=123416d979e44c2cf3403fffc23fe99c8d6d80d5;p=brisk.git diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 60ea624..41524d2 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -45,9 +45,11 @@ define('COMM_GEN_N', 50); define('CHAT_N', 3); define('CHAT_ILL_TIME', 6); +define('CHAT_ENABLED', TRUE); define('SESS_LEN', 13); define('STREAM_TIMEOUT', 60); +/* FIXME: move to sac-a-push .phh */ define('EXPIRE_TIME_RD', 180); define('EXPIRE_TIME_SMAMMA', 360); define('EXPIRE_TIME_WAG', 10); @@ -292,6 +294,13 @@ function mop_flush() flush(); } +function force_no_cache(&$header_out) +{ + $header_out['Pragma'] = 'no-cache, must-revalidate'; + $header_out['Cache-Control'] = 'no-cache'; + $header_out['Expires'] = '-1'; +} + function file_lock($fname, $is_exclusive) { if (($res = @fopen($fname, "r+")) == FALSE) { @@ -1470,7 +1479,7 @@ class Room { else { // normal chat line $is_normchat = TRUE; - if ($curtime < ($user->chat_ban + $user->chat_dlt)) { + if (CHAT_ENABLED && $curtime < ($user->chat_ban + $user->chat_dlt)) { $only_you = TRUE; $user->chat_dlt = $user->chat_dlt * 2; if ($user->chat_dlt > 120) @@ -1478,7 +1487,7 @@ class Room { } else if ($user->chat_lst == $msg) $only_you = TRUE; - else if ($curtime - $user->chattime[($user->chat_cur + 1) % CHAT_N] < CHAT_ILL_TIME) { + else if (CHAT_ENABLED && $curtime - $user->chattime[($user->chat_cur + 1) % CHAT_N] < CHAT_ILL_TIME) { $user->chat_ban = $curtime; $user->chat_dlt = 5; $only_you = TRUE; @@ -2170,6 +2179,8 @@ class Room { { printf("NEW_SOCKET (root): %d\n", intval($new_socket)); + force_no_cache($header_out); + switch ($path) { case "": case "index.php":