Skip to content

Instantly share code, notes, and snippets.

@leedo
Created February 11, 2013 21:34
Show Gist options
  • Save leedo/4757822 to your computer and use it in GitHub Desktop.
Save leedo/4757822 to your computer and use it in GitHub Desktop.
sub plugins {
my ($self, $network, $chan) = @_;
return @{$self->{plugins}} unless $network;
grep {
my $i = $_->config("ircs");
!$i || any {
lc $_->[0] eq lc $network
&& (!$chan || (!$_->[1] || lc $_->[1] eq lc $chan))
} map {[split "@", $_]} @$i;
} @{$self->{plugins}};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment