BBS-Universal

 view release on metacpan or  search on metacpan

lib/BBS/Universal.pm  view on Meta::CPAN

		['FONT 5',                    "\e[5m",  'ANSI FONT 5'],
		['FONT 6',                    "\e[6m",  'ANSI FONT 6'],
		['FONT 7',                    "\e[7m",  'ANSI FONT 7'],
		['FONT 8',                    "\e[8m",  'ANSI FONT 8'],
		['FONT 9',                    "\e[9m",  'ANSI FONT 9'],
		['FONT DOUBLE-HEIGHT TOP',    "\e#3",   'Double-Height Font Top Portion'],
		['FONT DOUBLE-HEIGHT BOTTOM', "\e#4",   'Double-Height Font Bottom Portion'],
		['FONT DOUBLE-WIDTH',         "\e#6",   'Double-Width Font'],
		['FONT DEFAULT SIZE',         "\e#5",   'Default Font Size'],
		['RESET',                     "\e[0m",  'Restore all attributes and colors to their defaults'],
		['BOLD',                      "\e[1m",  'Set to bold text'],
		['NORMAL',                    "\e[22m", 'Turn off all attributes'],
		['FAINT',                     "\e[2m",  'Set to faint (light) text'],
		['ITALIC',                    "\e[3m",  'Set to italic text'],
		['UNDERLINE',                 "\e[4m",  'Set to underlined text'],
		['DEFAULT UNDERLINE COLOR',   "\e[59m", 'Set underline color to the default'],
		['FRAMED',                    "\e[51m", 'Turn on framed text'],
		['FRAMED OFF',                "\e[54m", 'Turn off framed text'],
		['ENCIRCLED',                 "\e[52m", 'Turn on encircled letters'],
		['ENCIRCLED OFF',             "\e[54m", 'Turn off encircled letters'],
		['OVERLINED',                 "\e[53m", 'Turn on overlined text'],

lib/BBS/Universal.pm  view on Meta::CPAN

                    chomp($l);
                    chomp($f);
                    $f = uc($f);
                    if ($f eq 'IP') {
                        $l = colored(['bright_green'], $l);
                        $f = 'IP ADDRESS';
                    }
                    my $le = 11 - length($f);
                    $f .= ' ' x $le;
                    $l = colored(['green'],    uc($l))                                                                         if ($l =~ /^ok/i);
                    $l = colored(['bold red'], 'U') . colored(['bold bright_white'], 'S') . colored(['bold bright_blue'], 'A') if ($l =~ /^us/i);
                    $text .= colored(['bold bright_cyan'], sprintf("%${indent}s", $f)) . " = $l\n";
                } else {
                    $text .= "$line\n";
                }
            } ## end foreach my $line (@in)
        } else {
            my $orig = $ENV{$env};
            my $new;

            if ($orig =~ /(256color)/) {
                $new = colored(['red'], '2') . colored(['green'], '5') . colored(['yellow'], '6') . colored(['cyan'], 'c') . colored(['bright_blue'], 'o') . colored(['magenta'], 'l') . colored(['bright_green'], 'o') . colored(['bright_blue'], 'r');

lib/BBS/Universal.pm  view on Meta::CPAN

            } elsif ($orig =~ /(mint)/i) {
                $new = colored(['bright_green'], $1);
                $orig =~ s/$1/$new/g;
            } elsif ($orig =~ /(zorin)/i) {
                $new = colored(['bright_white'], $1);
                $orig =~ s/$1/$new/g;
            } elsif ($orig =~ /(wayland)/i) {
                $new = colored(['bright_yellow'], $1);
                $orig =~ s/$1/$new/g;
            }
            $text .= colored(['bold white'], sprintf("%${MAX}s", $env)) . ' = ' . $orig . "\n";
        } ## end else [ if ($ENV{$env} =~ /\n/g...)]
    } ## end foreach my $env (sort(keys ...))
    $self->{'debug'}->DEBUG(['End SysOp ShowENV']);
    return ($text);
} ## end sub sysop_showenv

sub sysop_scroll {
    my $self = shift;

    $self->{'debug'}->DEBUG(['Start SysOp Scroll']);

lib/BBS/Universal/ANSI.pm  view on Meta::CPAN

		['FONT 5',                    "\e[5m",  'ANSI FONT 5'],
		['FONT 6',                    "\e[6m",  'ANSI FONT 6'],
		['FONT 7',                    "\e[7m",  'ANSI FONT 7'],
		['FONT 8',                    "\e[8m",  'ANSI FONT 8'],
		['FONT 9',                    "\e[9m",  'ANSI FONT 9'],
		['FONT DOUBLE-HEIGHT TOP',    "\e#3",   'Double-Height Font Top Portion'],
		['FONT DOUBLE-HEIGHT BOTTOM', "\e#4",   'Double-Height Font Bottom Portion'],
		['FONT DOUBLE-WIDTH',         "\e#6",   'Double-Width Font'],
		['FONT DEFAULT SIZE',         "\e#5",   'Default Font Size'],
		['RESET',                     "\e[0m",  'Restore all attributes and colors to their defaults'],
		['BOLD',                      "\e[1m",  'Set to bold text'],
		['NORMAL',                    "\e[22m", 'Turn off all attributes'],
		['FAINT',                     "\e[2m",  'Set to faint (light) text'],
		['ITALIC',                    "\e[3m",  'Set to italic text'],
		['UNDERLINE',                 "\e[4m",  'Set to underlined text'],
		['DEFAULT UNDERLINE COLOR',   "\e[59m", 'Set underline color to the default'],
		['FRAMED',                    "\e[51m", 'Turn on framed text'],
		['FRAMED OFF',                "\e[54m", 'Turn off framed text'],
		['ENCIRCLED',                 "\e[52m", 'Turn on encircled letters'],
		['ENCIRCLED OFF',             "\e[54m", 'Turn off encircled letters'],
		['OVERLINED',                 "\e[53m", 'Turn on overlined text'],

lib/BBS/Universal/SysOp.pm  view on Meta::CPAN

                    chomp($l);
                    chomp($f);
                    $f = uc($f);
                    if ($f eq 'IP') {
                        $l = colored(['bright_green'], $l);
                        $f = 'IP ADDRESS';
                    }
                    my $le = 11 - length($f);
                    $f .= ' ' x $le;
                    $l = colored(['green'],    uc($l))                                                                         if ($l =~ /^ok/i);
                    $l = colored(['bold red'], 'U') . colored(['bold bright_white'], 'S') . colored(['bold bright_blue'], 'A') if ($l =~ /^us/i);
                    $text .= colored(['bold bright_cyan'], sprintf("%${indent}s", $f)) . " = $l\n";
                } else {
                    $text .= "$line\n";
                }
            } ## end foreach my $line (@in)
        } else {
            my $orig = $ENV{$env};
            my $new;

            if ($orig =~ /(256color)/) {
                $new = colored(['red'], '2') . colored(['green'], '5') . colored(['yellow'], '6') . colored(['cyan'], 'c') . colored(['bright_blue'], 'o') . colored(['magenta'], 'l') . colored(['bright_green'], 'o') . colored(['bright_blue'], 'r');

lib/BBS/Universal/SysOp.pm  view on Meta::CPAN

            } elsif ($orig =~ /(mint)/i) {
                $new = colored(['bright_green'], $1);
                $orig =~ s/$1/$new/g;
            } elsif ($orig =~ /(zorin)/i) {
                $new = colored(['bright_white'], $1);
                $orig =~ s/$1/$new/g;
            } elsif ($orig =~ /(wayland)/i) {
                $new = colored(['bright_yellow'], $1);
                $orig =~ s/$1/$new/g;
            }
            $text .= colored(['bold white'], sprintf("%${MAX}s", $env)) . ' = ' . $orig . "\n";
        } ## end else [ if ($ENV{$env} =~ /\n/g...)]
    } ## end foreach my $env (sort(keys ...))
    $self->{'debug'}->DEBUG(['End SysOp ShowENV']);
    return ($text);
} ## end sub sysop_showenv

sub sysop_scroll {
    my $self = shift;

    $self->{'debug'}->DEBUG(['Start SysOp Scroll']);



( run in 0.557 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )