]> ruin.nu Git - NDIRC.git/blobdiff - Dispatcher.pm
Fix so we can see if the command was executed or not
[NDIRC.git] / Dispatcher.pm
index 5da34bdaf5d9ab976419ff8151ceda3275462261..16dae1de9d4e2e637ed03a2c727710db74ad87ad 100644 (file)
@@ -110,7 +110,7 @@ sub has_command {
        my ($self,$command,$channel) = @_;
        $channel = lc $channel;
 
-       return 0 unless exists $self->commands->{$command};
+       return 0 unless defined $command && exists $self->commands->{$command};
 
        my $types = Set::Object->new(@{$self->commands->{$command}->type});
        my @types = qw/pub/;
@@ -146,6 +146,7 @@ sub run_command {
                        }
                }
        }
+       return 1;
 }
 
 1;