line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Declare our package |
2
|
|
|
|
|
|
|
package Games::AssaultCube::Log::Line::ClientVersion; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# import the Moose stuff |
5
|
1
|
|
|
1
|
|
2629
|
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 'version' => ( |
22
|
|
|
|
|
|
|
isa => 'Int', |
23
|
|
|
|
|
|
|
is => 'ro', |
24
|
|
|
|
|
|
|
required => 1, |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
has 'defs' => ( |
28
|
|
|
|
|
|
|
isa => 'Str', |
29
|
|
|
|
|
|
|
is => 'ro', |
30
|
|
|
|
|
|
|
required => 1, |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
has 'tostr' => ( |
34
|
|
|
|
|
|
|
isa => 'Str', |
35
|
|
|
|
|
|
|
is => 'ro', |
36
|
|
|
|
|
|
|
lazy => 1, |
37
|
|
|
|
|
|
|
default => sub { |
38
|
|
|
|
|
|
|
my $self = shift; |
39
|
|
|
|
|
|
|
return "Client from " . $self->ip . " connected with version " . $self->version; |
40
|
|
|
|
|
|
|
}, |
41
|
|
|
|
|
|
|
); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
no Moose; |
44
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
__END__ |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=for stopwords defs ip |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 NAME |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Games::AssaultCube::Log::Line::ClientVersion - Describes the ClientVersion event in a log line |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 ABSTRACT |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Describes the ClientVersion event in a log line |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 DESCRIPTION |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This module holds the "ClientVersion" event data from a log line. Normally, you would not use this class directly |
62
|
|
|
|
|
|
|
but via the L<Games::AssaultCube::Log::Line> class. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This line is emitted when a client connects to the AC server. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 Attributes |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Those attributes hold information about the event. As this class extends the L<Games::AssaultCube::Log::Line::Base> |
69
|
|
|
|
|
|
|
class, you can also use it's attributes too. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head3 ip |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
The ip of the client who just connected |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head3 version |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
The AC version of the client |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head3 defs |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
The loaded defs on the client ( not sure what it exactly means, ha! ) |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 AUTHOR |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Apocalypse E<lt>apocal@cpan.orgE<gt> |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Props goes to the BS clan for the support! |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
This project is sponsored by L<http://cubestats.net> |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Copyright 2009 by Apocalypse |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
96
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=cut |