AFINGER.C

LIB3/SECURE/AFINGER.C · 783 B

From the archive nm4dos.zip

Download the archive   « Back to the archive contents

inherit "/std/object";

void    setup()
{
    set_name( "emailer" );
    set_long( "This object will give the finger info on all creators.\n" );
}				/* setup() */

void    init()
{
    add_action( "do_afinger", "afinger" );
}				/* init() */

int     do_afinger()
{
    string *creators;
    int     i;

    creators = get_dir( "/w/" );
    for( i = 0; i < sizeof( creators ); i++ )
    {
	if( file_size( "/w/" + creators[ i ] ) != -2 )
	{
	    creators = delete( creators, i, 1 );
	    i--;
	}
	else
	    if( !"/secure/login"->test_creator( creators[ i ] ) )
	    {
		creators = delete( creators, i, 1 );
		i--;
	    }
    }
    for( i = 0; i < sizeof( creators ); i++ )
	write( (string)"/secure/finger"->finger_info( creators[ i ] ) + "\n\n" );
    return 1;
}				/* do_info() */

Site Stats

Snippets: 1791
Codebases: 571