define('CHAT_N', 3);
define('CHAT_ILL_TIME', 6);
+define('CHAT_ENABLED', TRUE);
define('SESS_LEN', 13);
define('STREAM_TIMEOUT', 60);
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) {
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)
}
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;
{
printf("NEW_SOCKET (root): %d\n", intval($new_socket));
+ force_no_cache($header_out);
+
switch ($path) {
case "":
case "index.php":