summaryrefslogtreecommitdiffstats
path: root/lib/ASM
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2015-12-26 20:22:59 -0700
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2015-12-26 20:22:59 -0700
commit786e5f91e16bc3a709ef06d0ffa1808bd92a6451 (patch)
treecee07015f6739c6650e1d5ad170bcd8fa8c86914 /lib/ASM
parentd723856b8443154e76a6954ae994181a2b9cb034 (diff)
Better undef-checking -> less warnings
Diffstat (limited to 'lib/ASM')
-rw-r--r--lib/ASM/Commander.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ASM/Commander.pm b/lib/ASM/Commander.pm
index aa79f4d..d864800 100644
--- a/lib/ASM/Commander.pm
+++ b/lib/ASM/Commander.pm
@@ -23,7 +23,10 @@ sub command
my $cmd = $args;
my $d1;
my $nick = lc $event->{nick};
- my $acct = lc $::sn{$nick}->{account};
+ my $acct;
+ if (defined($::sn{$nick}) && defined($::sn{$nick}->{account})) {
+ $acct = lc $::sn{$nick}->{account};
+ }
# return 0 unless (ASM::Util->speak($event->{to}->[0]));
foreach my $command ( @{$::commands->{command}} )
{