Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Ptt(3)		      User Contributed Perl Documentation		Ptt(3)

NAME
       BBS::UserInfo::Ptt - Get	user information of PTT-style BBS

SYNOPSIS
	   use BBS::UserInfo::Ptt;

	   # create object
	   my $bot = BBS::UserInfo::Ptt->new(
		   'debug' => 1,
		   'port' => 23,
		   'server' => 'ptt.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::Ptt object, there are some parameters that you
       can define:

	   server => 'ptt.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:

       o   nickname

       o   logintimes

       o   posttimes

       o   lastlogintime

       o   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.

perl v5.32.0			  2006-08-19				Ptt(3)

NAME | SYNOPSIS | FUNCTIONS | AUTHOR | COPYRIGHT & LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=BBS::UserInfo::Ptt&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help