--- loncom/lond 2003/08/12 09:39:23 1.135 +++ loncom/lond 2003/08/12 19:46:04 1.136 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.135 2003/08/12 09:39:23 foxr Exp $ +# $Id: lond,v 1.136 2003/08/12 19:46:04 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -81,7 +81,7 @@ my $DEBUG = 0; # Non zero to ena my $status=''; my $lastlog=''; -my $VERSION='$Revision: 1.135 $'; #' stupid emacs +my $VERSION='$Revision: 1.136 $'; #' stupid emacs my $remoteVERSION; my $currenthostid; my $currentdomainid; @@ -1733,6 +1733,19 @@ sub make_new_child { } if ($ulsout eq '') { $ulsout='empty'; } print $client "$ulsout\n"; +# ----------------------------------------------------------------- setannounce + } elsif ($userinput =~ /^setannounce/) { + my ($cmd,$announcement)=split(/:/,$userinput); + chomp($announcement); + $announcement=&unescape($announcement); + if (my $store=IO::File->new('>'.$perlvar{'lonDocRoot'}. + '/announcement.txt')) { + print $store $announcement; + close $store; + print $client "ok\n"; + } else { + print $client "error: ".($!+0)."\n"; + } # ------------------------------------------------------------------ Hanging up } elsif (($userinput =~ /^exit/) || ($userinput =~ /^init/)) {