line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Declare our package |
2
|
|
|
|
|
|
|
package Games::AssaultCube::Log::Line::ClientConnected; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# import the Moose stuff |
5
|
1
|
|
|
1
|
|
7025
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# Initialize our version |
8
|
|
|
|
|
|
|
use vars qw( $VERSION ); |
9
|
|
|
|
|
|
|
$VERSION = '0.04'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
extends 'Games::AssaultCube::Log::Line::Base'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# TODO improve validation for everything here, ha! |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has 'ip' => ( |
16
|
|
|
|
|
|
|
isa => 'Str', |
17
|
|
|
|
|
|
|
is => 'ro', |
18
|
|
|
|
|
|
|
required => 1, |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
has 'tostr' => ( |
22
|
|
|
|
|
|
|
isa => 'Str', |
23
|
|
|
|
|
|
|
is => 'ro', |
24
|
|
|
|
|
|
|
lazy => 1, |
25
|
|
|
|
|
|
|
default => sub { |
26
|
|
|
|
|
|
|
my $self = shift; |
27
|
|
|
|
|
|
|
return "Client from " . $self->ip . " connected"; |
28
|
|
|
|
|
|
|
}, |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
no Moose; |
32
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
__END__ |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=for stopwords ip |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Games::AssaultCube::Log::Line::ClientConnected - Describes the ClientConnected event in a log line |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 ABSTRACT |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Describes the ClientConnected event in a log line |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 DESCRIPTION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
This module holds the "ClientConnected" event data from a log line. Normally, you would not use this class directly |
50
|
|
|
|
|
|
|
but via the L<Games::AssaultCube::Log::Line> class. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This line is emitted when a client connects to the AC server. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 Attributes |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Those attributes hold information about the event. As this class extends the L<Games::AssaultCube::Log::Line::Base> |
57
|
|
|
|
|
|
|
class, you can also use it's attributes too. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head3 ip |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
The ip of the client who just connected |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 AUTHOR |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Apocalypse E<lt>apocal@cpan.orgE<gt> |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Props goes to the BS clan for the support! |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
This project is sponsored by L<http://cubestats.net> |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Copyright 2009 by Apocalypse |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
76
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |