mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 05:49:27 +01:00
NickList: add get_nicks() function
This commit is contained in:
parent
2de9ad516f
commit
d9aa585949
@ -124,6 +124,17 @@ sub get_channels {
|
||||
return \@channels;
|
||||
}
|
||||
|
||||
sub get_nicks {
|
||||
my ($self, $channel) = @_;
|
||||
$channel = lc $channel;
|
||||
my @nicks;
|
||||
return @nicks if not exists $self->{nicklist}->{$channel};
|
||||
foreach my $nick (keys %{ $self->{nicklist}->{$channel} }) {
|
||||
push @nicks, $self->{nicklist}->{$channel}->{$nick}->{nick};
|
||||
}
|
||||
return @nicks;
|
||||
}
|
||||
|
||||
sub set_meta {
|
||||
my ($self, $channel, $nick, $key, $value) = @_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user