BBS-Universal

 view release on metacpan or  search on metacpan

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

        'debug'           => $params->{'debug'},
        'socket'          => $socket,
        'cl_socket'       => $cl_socket,
        'peerhost'        => (defined($cl_socket)) ? $cl_socket->peerhost() : undef,
        'peerport'        => (defined($cl_socket)) ? $cl_socket->peerport() : undef,
        'os'              => $os,
        'suffixes'        => [qw( ASCII ATASCII PETSCII ANSI )],
        'text_modes'      => {
            'ASCII'   => 0,
            'ATASCII' => 1,
            'PETSCII' => 2,
            'ANSI'    => 3,
        },
        'host'          => undef,
        'port'          => undef,
        'access_levels' => {
            'USER'         => 0,
            'VETERAN'      => 1,
            'JUNIOR SYSOP' => 2,
            'SYSOP'        => 65535,
        },
###
        'telnet_commands' => [
            'SE (Subnegotiation end)',
            'NOP (No operation)',
            'Data Mark',
            'Break',
            'Interrupt Process',
            'Abort output',
            'Are you there?',
            'Erase character',
            'Erase Line',
            'Go ahead',
            'SB (Subnegotiation begin)',
            'WILL',
            "WON'T",
            'DO',
            "DON'T",
            'IAC',
        ],
        'telnet_options'  => [
            'Binary Transmission',
            'Echo',
            'Reconnection',
            'Suppress Go Ahead',
            'Approx Message Size Negotiation',
            'Status',
            'Timing Mark',
            'Remote Controlled Trans and Echo',
            'Output Line Width',
            'Output Page Size',
            'Output Carriage-Return Disposition',
            'Output Horizontal Tab Stops',
            'Output Horizontal Tab Disposition',
            'Output Formfeed Disposition',
            'Output Vertical Tabstops',
            'Output Vertical Tab Disposition',
            'Output Linefeed Disposition',
            'Extended ASCII',
            'Logout',
            'Byte Macro',
            'Data Entry Terminal',
            'RFC 1043',
            'RFC 732',
            'SUPDUP',
            'RFC 736',
            'RFC 734',
            'SUPDUP Output',
            'Send Location',
            'Terminal Type',
            'End of Record',
            'TACACS User Identification',
            'Output Marking',
            'Terminal Location Number',
            'Telnet 3270 Regime',
            '30X.3 PAD',
            'Negotiate About Window Size',
            'Terminal Speed',
            'Remote Flow Control',
            'Linemode',
            'X Display Location',
            'Environment Option',
            'Authentication Option',
            'Encryption Option',
            'New Environment Option',
            'TN3270E',
            'XAUTH',
            'CHARSET',
            'Telnet Remote Serial Port (RSP)',
            'Com Port Control Option',
            'Telnet Suppress Local Echo',
            'Telnet Start TLS',
            'KERMIT',
            'SEND-URL',
            'FORWARD_',
        ],
###
    };

    bless($self, $class);
    $self->populate_common();
    $self->{'CACHE'} = Cache::Memcached::Fast->new(
        {
            'servers' => [
                {
                    'address' => $self->{'CONF'}->{'MEMCACHED HOST'} . ':' . $self->{'CONF'}->{'MEMCACHED PORT'},
                },
            ],
            'namespace' => $self->{'CONF'}->{'MEMCACHED NAMESPACE'},
            'utf8'      => TRUE,
        }
    );
    $self->{'debug'}->DEBUG(['End New']);
    return ($self);
} ## end sub new

sub populate_common {
    my $self = shift;

    $self->{'debug'}->DEBUG(['Start Populate Common']);
    my ($wsize, $hsize, $wpixels, $hpixels) = GetTerminalSize();



( run in 0.705 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )