3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 03:33:06 +01:00

Add explicit dereferences

This commit is contained in:
Pragmatic Software 2016-02-25 00:46:55 -08:00
parent fb846a36ed
commit 76d9184c1d

View File

@ -104,8 +104,8 @@ sub get_baninfo {
my ($nick, $user, $host) = $mask =~ m/([^!]+)!([^@]+)@(.*)/;
foreach my $mode (keys %{ $self->{banlist}{$channel} }) {
foreach my $banmask (keys %{ $self->{banlist}{$channel}{$mode} }) {
foreach my $mode (keys %{ $self->{banlist}->{$channel} }) {
foreach my $banmask (keys %{ $self->{banlist}->{$channel}->{$mode} }) {
if($banmask =~ m/^\$a:(.*)/) {
$ban_account = lc $1;
} else {
@ -138,8 +138,8 @@ sub get_baninfo {
my $baninfo = {};
$baninfo->{banmask} = $banmask_key;
$baninfo->{channel} = $channel;
$baninfo->{owner} = $self->{banlist}{$channel}{$mode}{$banmask_key}[0];
$baninfo->{when} = $self->{banlist}{$channel}{$mode}{$banmask_key}[1];
$baninfo->{owner} = $self->{banlist}->{$channel}->{$mode}->{$banmask_key}->[0];
$baninfo->{when} = $self->{banlist}->{$channel}->{$mode}->{$banmask_key}->[1];
$baninfo->{type} = $mode;
$self->{pbot}->{logger}->log("get-baninfo: dump: " . Dumper($baninfo) . "\n");