File: User.pod

package info (click to toggle)
net-hotline 0.78-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 356 kB
  • ctags: 351
  • sloc: perl: 4,265; makefile: 33
file content (84 lines) | stat: -rw-r--r-- 1,968 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
=head1 NAME

Net::Hotline::User - User object used internally by Net::Hotline::Client

=head1 SYNOPSIS

    use Net::Hotline::User;

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

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

=head1 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.

=head1 CONSTRUCTION

=over 4

=item new SOCKET, NICK, LOGIN, ICON, COLOR

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.

=back

=head1 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.

=over 4

=item color NUMBER

The color of the user in the userlist.  Values are numbers from 0 to 3. The
hash HTLC_COLORS defined in Net::Hotline::Constants contains number to name
color mappings (i.e. $HTLC_COLORS{2} is "red").  Example:

	use Net::Hotline::Constants qw(HTLC_COLORS);
	...
	print $user->nick(), " is ", $HTLC_COLORS{$user->color()}, "\n";

=item icon NUMBER

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

=item info TEXT

User information as a block of "pretty-formatted" text.

=item login TEXT

The user's login name.

=item nick TEXT

The user's nickname in the userlist.

=item socket NUMBER

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

=back

=head1 AUTHOR

John C. Siracusa (siracusa@mindspring.com)

=head1 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.