diff options
| author | fukachan <fukachan> | 2002-02-11 10:24:13 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-02-11 10:24:13 +0000 |
| commit | 2a25d6a9bf91239a4c8f73998b8909e8fcfbe4fe (patch) | |
| tree | 1a7c5cede70c28b967cacb021727511605e36a33 | |
| parent | 32ffb28d02456dbab54e9f29696ab465fdac62b5 (diff) | |
| download | fml8-2a25d6a9bf91239a4c8f73998b8909e8fcfbe4fe.tar.gz fml8-2a25d6a9bf91239a4c8f73998b8909e8fcfbe4fe.tar.bz2 fml8-2a25d6a9bf91239a4c8f73998b8909e8fcfbe4fe.zip | |
send help in $DIR for backward compatibility if it is found.
if not, send the defaulte message.
| -rw-r--r-- | fml/lib/FML/Command/User/help.pm | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/fml/lib/FML/Command/User/help.pm b/fml/lib/FML/Command/User/help.pm index a9dac735..deef1c8f 100644 --- a/fml/lib/FML/Command/User/help.pm +++ b/fml/lib/FML/Command/User/help.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2001 Ken'ichi Fukamachi +# Copyright (C) 2001,2002 Ken'ichi Fukamachi # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: help.pm,v 1.6 2001/12/22 09:21:05 fukachan Exp $ +# $FML: help.pm,v 1.7 2001/12/22 16:10:51 fukachan Exp $ # package FML::Command::User::help; @@ -47,8 +47,17 @@ sub process my ($self, $curproc, $command_args) = @_; my $config = $curproc->{ config }; - $command_args->{ _file_to_send } = $config->{ "help_file" }; - $self->send_file($curproc, $command_args); + # if "help" is found in $ml_home_dir (e.g. /var/spool/ml/elena), + # send it. + if (-f $config->{ "help_file" }) { + $command_args->{ _file_to_send } = $config->{ "help_file" }; + $self->send_file($curproc, $command_args); + } + # if "help" is not found, use the default help message. + else { + $curproc->reply_message_nl('help.user.help', + "help unavailable (error)."); + } } |
