version 1.135, 2003/08/12 09:39:23
|
version 1.137, 2003/08/19 10:46:14
|
Line 652 sub make_new_child {
|
Line 652 sub make_new_child {
|
if ($userinput =~ /^ping/) { |
if ($userinput =~ /^ping/) { |
print $client "$currenthostid\n"; |
print $client "$currenthostid\n"; |
# ------------------------------------------------------------------------ pong |
# ------------------------------------------------------------------------ pong |
} elsif ($userinput =~ /^pong/) { |
}elsif ($userinput =~ /^pong/) { |
my $reply=&reply("ping",$hostid{$clientip}); |
my $reply=&reply("ping",$hostid{$clientip}); |
print $client "$currenthostid:$reply\n"; |
print $client "$currenthostid:$reply\n"; |
# ------------------------------------------------------------------------ ekey |
# ------------------------------------------------------------------------ ekey |
Line 683 sub make_new_child {
|
Line 683 sub make_new_child {
|
} elsif ($userinput =~ /^userload/) { |
} elsif ($userinput =~ /^userload/) { |
my $userloadpercent=&userload(); |
my $userloadpercent=&userload(); |
print $client "$userloadpercent\n"; |
print $client "$userloadpercent\n"; |
|
|
|
# |
|
# Transactions requiring encryption: |
|
# |
# ----------------------------------------------------------------- currentauth |
# ----------------------------------------------------------------- currentauth |
} elsif ($userinput =~ /^currentauth/) { |
} elsif ($userinput =~ /^currentauth/) { |
if ($wasenc==1) { |
if ($wasenc==1) { |
Line 697 sub make_new_child {
|
Line 701 sub make_new_child {
|
} else { |
} else { |
print $client "refused\n"; |
print $client "refused\n"; |
} |
} |
|
#--------------------------------------------------------------------- pushfile |
|
} elsif($userinput =~ /^pushfile/) { |
|
print $client "ok\n"; |
|
#--------------------------------------------------------------------- reinit |
|
} elsif($userinput =~ /^reinit/) { |
|
print $client "ok\n"; |
# ------------------------------------------------------------------------ auth |
# ------------------------------------------------------------------------ auth |
} elsif ($userinput =~ /^auth/) { |
} elsif ($userinput =~ /^auth/) { |
if ($wasenc==1) { |
if ($wasenc==1) { |
Line 1733 sub make_new_child {
|
Line 1743 sub make_new_child {
|
} |
} |
if ($ulsout eq '') { $ulsout='empty'; } |
if ($ulsout eq '') { $ulsout='empty'; } |
print $client "$ulsout\n"; |
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 |
# ------------------------------------------------------------------ Hanging up |
} elsif (($userinput =~ /^exit/) || |
} elsif (($userinput =~ /^exit/) || |
($userinput =~ /^init/)) { |
($userinput =~ /^init/)) { |