3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 05:49:27 +01:00

ban-tracker: dump more information when nickserv account matches existing ban

This commit is contained in:
Pragmatic Software 2011-02-17 23:49:42 +00:00
parent a57394c762
commit 4a552e2935
2 changed files with 6 additions and 3 deletions

View File

@ -64,6 +64,7 @@ sub get_baninfo {
foreach my $channel (keys %{ $self->{banlist} }) {
foreach my $banmask (keys %{ $self->{banlist}{$channel} }) {
my $banmask_key = $banmask;
$banmask = quotemeta $banmask;
$banmask =~ s/\\\*/.*?/g;
@ -71,8 +72,10 @@ sub get_baninfo {
if($mask =~ m/$banmask/i) {
my $baninfo = {};
$baninfo->{banmask} = $banmask_key;
$baninfo->{channel} = $channel;
$baninfo->{owner} = $self->{banlist}{$channel}[0];
$baninfo->{owner} = $self->{banlist}{$channel}{$banmask_key}[0];
$baninfo->{when} = $self->{banlist}{$channel}{$banmask_key}[1];
$self->{pbot}->logger->log("get-baninfo: dump: " . Dumper($baninfo) . "\n");
return $baninfo;
}

View File

@ -13,8 +13,8 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 320,
BUILD_DATE => "2011-02-14",
BUILD_REVISION => 321,
BUILD_DATE => "2011-02-17",
};
1;