--- loncom/lond 2003/09/08 10:32:07 1.141 +++ loncom/lond 2003/09/09 20:47:46 1.142 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.141 2003/09/08 10:32:07 foxr Exp $ +# $Id: lond,v 1.142 2003/09/09 20:47:46 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -60,6 +60,9 @@ # 09/08/2003 Ron Fox: Told lond to take care of change logging so we # don't have to remember it: # $Log: lond,v $ +# Revision 1.142 2003/09/09 20:47:46 www +# Permanently store chatroom entries in chatroom.log +# # Revision 1.141 2003/09/08 10:32:07 foxr # Added PushFile sub This sub oversees the push of a new configuration table file # Currently supported files are: @@ -90,7 +93,7 @@ my $DEBUG = 0; # Non zero to ena my $status=''; my $lastlog=''; -my $VERSION='$Revision: 1.141 $'; #' stupid emacs +my $VERSION='$Revision: 1.142 $'; #' stupid emacs my $remoteVERSION; my $currenthostid; my $currentdomainid; @@ -2043,10 +2046,10 @@ sub chatadd { my %hash; my $proname=&propath($cdom,$cname); my @entries=(); + my $time=time; if (tie(%hash,'GDBM_File',"$proname/nohist_chatroom.db", &GDBM_WRCREAT(),0640)) { @entries=map { $_.':'.$hash{$_} } sort keys %hash; - my $time=time; my ($lastid)=($entries[$#entries]=~/^(\w+)\:/); my ($thentime,$idnum)=split(/\_/,$lastid); my $newid=$time.'_000000'; @@ -2066,6 +2069,12 @@ sub chatadd { } untie %hash; } + { + my $hfh; + if ($hfh=IO::File->new(">>$proname/chatroom.log")) { + print $hfh "$time:".&unescape($newchat)."\n"; + } + } } sub unsub { 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.