#!/usr/bin/perl
$t = localtime(time);
@t1 = split(/ /,$t);
open(F,"/usr/local/etc/httpd/cgi-bin/tlc/chat.dat");
open(F1,">/usr/local/etc/httpd/cgi-bin/tlc/chat_dat");
while(<F>){
	$ff = $_;
	if($ff =~ /1996/){
		@t2 = split(/ /,$ff);
		if(@t2[1] != @t1[2]){
			close(F);
			close(F1);
			system("cp /usr/local/etc/httpd/cgi-bin/tlc/chat.dat /usr/local/etc/httpd/cgi-bin/tlc/chat.bac");
			system("mv /usr/local/etc/httpd/cgi-bin/tlc/chat_dat /usr/local/etc/httpd/cgi-bin/tlc/chat.dat");
                        system("mail webmaster\@ezenet.com < /usr/local/etc/httpd/cgi-bin/tlc/chat.bac");
			
exit;
		}
	}
	print F1 $ff;
	
}
close(F);
close(F1);
