diff options
| author | fukachan <fukachan> | 2002-07-25 00:10:11 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-07-25 00:10:11 +0000 |
| commit | e79338dad4cd4374eddadab765a098e00a8b26ef (patch) | |
| tree | 4caadbe0f6d38c8935a1c7f733714031eec8ce18 /fml/lib/FML/Process/Command.pm | |
| parent | 122f1b505c5a2384cc30e7b8f714758a661a82a7 (diff) | |
| download | fml8-e79338dad4cd4374eddadab765a098e00a8b26ef.tar.gz fml8-e79338dad4cd4374eddadab765a098e00a8b26ef.tar.bz2 fml8-e79338dad4cd4374eddadab765a098e00a8b26ef.zip | |
improve error messages
Diffstat (limited to 'fml/lib/FML/Process/Command.pm')
| -rw-r--r-- | fml/lib/FML/Process/Command.pm | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/fml/lib/FML/Process/Command.pm b/fml/lib/FML/Process/Command.pm index 458e0fdb..4b8fdd5d 100644 --- a/fml/lib/FML/Process/Command.pm +++ b/fml/lib/FML/Process/Command.pm @@ -3,7 +3,7 @@ # Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Command.pm,v 1.66 2002/07/18 23:51:03 fukachan Exp $ +# $FML: Command.pm,v 1.67 2002/07/19 03:11:01 fukachan Exp $ # package FML::Process::Command; @@ -475,8 +475,23 @@ sub _get_command_mode } } else { - $status->{ _stop_reason_key } = 'command.auth_fail'; - $status->{ _stop_reason_str } = "not authenticated."; + # Exapmle: incorrect password + if ($is_admin && (! $is_auth)) { + $status->{ _stop_reason_key } = 'command.auth_fail'; + $status->{ _stop_reason_str } = "not authenticated."; + } + # Example: not admin member (not in members-admin) + elsif ((! $is_admin) && $is_auth) { + $status->{ _stop_reason_key } = 'error.not_admin_member'; + $status->{ _stop_reason_str } = "not admin member."; + LogError("not admin member"); + } + # other reasons + else { + $status->{ _stop_reason_key } = 'command.auth_fail'; + $status->{ _stop_reason_str } = "not authenticated."; + } + LogError("admin command not authenticated"); return '__LAST__'; } |
