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

Correct name of file in error message

This commit is contained in:
Pragmatic Software 2015-09-06 22:04:46 -07:00
parent 16f467252b
commit f8dba73d02

View File

@ -13,7 +13,7 @@ use PBot::HashObject;
sub new {
if(ref($_[1]) eq 'HASH') {
Carp::croak ("Options to Commands should be key/value pairs, not hash reference");
Carp::croak ("Options to " . __FILE__ . " should be key/value pairs, not hash reference");
}
my ($class, %conf) = @_;
@ -26,7 +26,7 @@ sub new {
sub initialize {
my ($self, %conf) = @_;
$self->{pbot} = delete $conf{pbot} // Carp::croak("Missing pbot reference to Channels");
$self->{pbot} = delete $conf{pbot} // Carp::croak("Missing pbot reference to " . __FILE__);
$self->{channels} = PBot::HashObject->new(pbot => $self->{pbot}, name => 'Channels', filename => delete $conf{filename});
$self->load_channels;