line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Webqq::Qun::One; |
2
|
1
|
|
|
1
|
|
5
|
use base qw(Webqq::Qun); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
116
|
|
3
|
1
|
|
|
1
|
|
6
|
use Storable qw(dclone); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
179
|
|
4
|
|
|
|
|
|
|
sub find_member { |
5
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
6
|
0
|
|
|
|
|
|
my %p = @_; |
7
|
0
|
|
|
|
|
|
my @member; |
8
|
0
|
|
|
|
|
|
my %filter = ( |
9
|
|
|
|
|
|
|
sex => 1, |
10
|
|
|
|
|
|
|
card => 1, |
11
|
|
|
|
|
|
|
qq => 1, |
12
|
|
|
|
|
|
|
nick => 1, |
13
|
|
|
|
|
|
|
role => 1, |
14
|
|
|
|
|
|
|
bad_record => 1, |
15
|
|
|
|
|
|
|
); |
16
|
0
|
|
|
|
|
|
for my $k (keys %p){ |
17
|
0
|
0
|
|
|
|
|
unless(exists $filter{$k}){ |
18
|
0
|
|
|
|
|
|
delete $p{$k} ; |
19
|
0
|
|
|
|
|
|
next; |
20
|
|
|
|
|
|
|
} |
21
|
0
|
0
|
|
|
|
|
delete $p{$k} unless defined $p{$k}; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
$self->SUPER::each($self->{members},sub{ |
24
|
0
|
|
|
0
|
|
|
my $m = dclone(shift); |
25
|
0
|
|
|
|
|
|
for my $k (keys %p){ |
26
|
0
|
0
|
|
|
|
|
return if $m->{$k} ne $p{$k}; |
27
|
|
|
|
|
|
|
} |
28
|
0
|
|
|
|
|
|
$m->{qun_name} = $self->{qun_name}; |
29
|
0
|
|
|
|
|
|
$m->{qun_number} = $self->{qun_number}; |
30
|
0
|
|
|
|
|
|
push @member,bless $m,"Webqq::Qun::Member"; |
31
|
0
|
|
|
|
|
|
}); |
32
|
|
|
|
|
|
|
|
33
|
0
|
0
|
|
|
|
|
return wantarray?@member:$member[0]; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
#sub del_member { |
38
|
|
|
|
|
|
|
# my $self = shift; |
39
|
|
|
|
|
|
|
#} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
#sub add_member { |
42
|
|
|
|
|
|
|
# my $self = shift; |
43
|
|
|
|
|
|
|
#} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
#sub set_admin { |
46
|
|
|
|
|
|
|
# my $self = shift; |
47
|
|
|
|
|
|
|
#} |
48
|
|
|
|
|
|
|
1; |