#!/usr/local/bin/perl

my $coach;
my $temp_coach;
my $proxy;
my $nameUsed;
$nameUsed = "REFRESH";
my $buffer;
my @pairs;


($temp_coach,$proxy) = split(/\=/, $ENV{'QUERY_STRING'});
if ($proxy == 1){
	$coach = $temp_coach;
}

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
%months=(0,"Jan",1,"Feb",2,"Mar",3,"Apr",4,"May",5,"Jun",6,"Jul",7,"Aug",8,"Sep",9,"Oct",10,"Nov",11,"Dec");
@pairs = split(/&/, $buffer);


use Fcntl ':flock';

open LOG, ">>./out/talk.log";
flock LOG, LOCK_EX;


$count = 0;
print  "Content-type: text/html\n";
print "Pragma: no-cache\n\n";
print  "<HTML><HEAD>\n";
print  "<Title>AHA chatter</Title>\n";
print "<META HTTP-EQUIV=\"Refresh\" Content=\"1800; URL=talk.cgi?$coach=1\">\n";
print "</HEAD>\n";


print "<BODY BGCOLOR=\"#008800\" text=\"770000\" link=\"00ff00\" vlink=\"00ff00\" alink=\"00ff00\">\n";

print "<center>\n";
print "Chat currently disabled due to spam.\n";
print "<center><br>\n";


print "</body></html>";
