3 # InspIRCd -- Internet Relay Chat Daemon
5 # Copyright (C) 2020-2021 Sadie Powell <sadie@witchery.services>
7 # This file is part of InspIRCd. InspIRCd is free software: you can
8 # redistribute it and/or modify it under the terms of the GNU General Public
9 # License as published by the Free Software Foundation, version 2.
11 # This program is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
23 use warnings FATAL => qw(all);
25 use File::Basename qw(dirname);
26 use FindBin qw($RealDir);
28 use lib dirname $RealDir;
32 if (scalar @ARGV < 2) {
33 say STDERR console_format "<|GREEN Usage:|> $0 <<|UNDERLINE FILE|>> [<|UNDERLINE DIRECTIVES...|>]";
38 print_error "<|GREEN $file|> does not exist and/or is not a file!" unless -f $file;
40 for my $directive (@ARGV) {
41 my $value = get_directive $file, $directive, '';
43 say console_format "<|GREEN $directive|>: $value";