X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Dispatcher.pm;h=6705349b8081b4da430edc43ee3e48d12adf0217;hb=refs%2Fheads%2Fnoeos;hp=107ed7eaa778fc962f44281a667317c984cd32ac;hpb=52aa24ac076b97096ff29e7a59331654620f230c;p=NDIRC.git diff --git a/Dispatcher.pm b/Dispatcher.pm index 107ed7e..6705349 100644 --- a/Dispatcher.pm +++ b/Dispatcher.pm @@ -68,6 +68,7 @@ sub load { warn "couldn't run $file" unless $return; } } + $DISP = undef; } sub command ($$$) { @@ -98,6 +99,7 @@ sub has_command { my ($self,$command,$channel) = @_; $channel = lc $channel; + return 0 unless defined $command && defined $channel; return 0 unless exists $self->commands->{$command}; return 0 unless exists $self->channels->{$channel};