Gea-Suan Lin

NAME

BBS::UserInfo::Wretch - Get user information of Wretch-style BBS

SYNOPSIS

    use BBS::UserInfo::Wretch;

    my $foo = BBS::UserInfo::Wretch->new(
            'debug' => 1,
            'port' => 23,
            'server' => 'bbs.wretch.cc',
            'telnet' => '/usr/bin/telnet',
            'timeout' => 10
            );

    # connect to the server
    $bot->connect() or die('Unable to connect BBS');

    my $userdata = $bot->query('username');

    # print some data
    print($userdata->{'logintimes'});

FUNCTIONS

new()

Create a BBS::UserInfo::Wretch object, there are some parameters that you can define:

    server => 'bbs.wretch.cc'   # Necessary, server name
    port => 23                  # Optional, server port
    telnet => 'telnet'          # Optional, telnet program
    timeout => 10               # Optional, Expect timeout
    debug => 1                  # Optional, print debug information

connect()

Connect to the BBS server.

query()

Query user information and return a hash reference with:

  • nickname

  • logintimes

  • posttimes

  • lastlogintime

  • lastloginip

AUTHOR

Gea-Suan Lin, <gslin at gslin.org>

COPYRIGHT & LICENSE

Copyright 2006 Gea-Suan Lin, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.