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