SYNOPSIS

    use Net::Hotline::User;

    $user = new Net::Hotline::User;
    $user->nick("joe blow");
    $user->icon(128);

    print "Nick: ", $user->nick(), "\n";
    ...

DESCRIPTION

Net::Hotline::User is a simple class for storing and retrieving user information, You should never have to create your own Net::Hotline::User objects when using Net::Hotline::Client. Getting and setting attributes is all that should be necessary.

CONSTRUCTION

new \s-1SOCKET\s0, \s-1NICK\s0, \s-1LOGIN\s0, \s-1ICON\s0, \s-1COLOR\s0

With no arguments, creates a new Net::Hotline::User object with all attributes set to undef. The other option is to supply exactly 5 arguments as listed above.

METHODS

All the Net::Hotline::User methods are simple attribute get/set routines. If given an argument, they set an attribute. In all cases, they return the current value of the attribute.

color \s-1NUMBER\s0

The color of the user in the userlist. Values are numbers from 0 to 3. The hash \s-1HTLC_COLORS\s0 defined in Net::Hotline::Constants contains number to name color mappings (i.e. $HTLC_COLORS{2} is \*(L"red\*(R"). Example: use Net::Hotline::Constants qw(HTLC_COLORS); ... print $user->nick(), " is ", $HTLC_COLORS{$user->color()}, "\n";

icon \s-1NUMBER\s0

The user's icon number. Negative values are accepted.

info \s-1TEXT\s0

User information as a block of \*(L"pretty-formatted\*(R" text.

login \s-1TEXT\s0

The user's login name.

nick \s-1TEXT\s0

The user's nickname in the userlist.

socket \s-1NUMBER\s0

The user's unique socket number. User's are assigned a socket number whenthey connect to a Hotline server.

AUTHOR

John C. Siracusa ([email protected])

COPYRIGHT

Copyright(c) 1999 by John Siracusa. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.