Rechercher une page de manuel
IRC::Bot::Auth.3pm
Langue: en
Version: 2006-01-25 (mandriva - 01/05/08)
Section: 3 (Bibliothèques de fonctions)
NAME
Auth.pm - A module to handle sessions for IRC::Bot.SYNOPSIS
use IRC::Bot::Auth my $seen = IRC::Bot::Auth->new();
# later on...
# Check to see if $nick has existing session sub on_public { my ( $kernel, $who, $where, $msg ) = @_[ KERNEL, ARG0, ARG1, ARG2 ]; my $nick = ( split /!/, $who )[0];
# Do Stuff...
my $check = $auth->is_auth( $nick ); if ( $check != 1 ) { # Do stuff... } else { # Denied }
}
DESCRIPTION
Provides session handling for IRC::Bot.METHODS
- is_auth()
- is_auth() takes one argument, users nick, and checks to see if they are authed. Returns 0 if authed, 1 if otherwise.
Use like so:
my $check = $auth->is_auth( $nick );
- get_ses()
- get_ses() takes a nickname as an argument. Checks to see if user is authed and returns data from session.
Use like so:
my $nick_ses = $auth->get_ses( $nick );
- auth_set()
- auth_set() Sets users session. Takes a nick for an argument, sets session time at one hour.
Use like so:
$auth->auth_set( $nick );
- de_auth()
- de_auth() clears the session, takes a nick for an argument.
Use like so:
$auth->de_auth( $nick );
CREDITS
See IRC::BotAUTHOR
Benjamin Smith defitro@just-another.netSEE ALSO
IRC::Bot POE::Component::IRC Cache::FileCacheContenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre