3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 11:12:42 +01:00
pbot/lib/PBot/Core/Handlers.pm
Pragmatic Software 926d57990b Support named-parameters in command registration
- convert several plugins to use named-parameters
- misc clean-ups in unrelated files
2021-07-30 19:01:24 -07:00

26 lines
556 B
Perl

# File: Handlers.pm
#
# Purpose: Loads handlers in the Handlers directory.
# SPDX-FileCopyrightText: 2021 Pragmatic Software <pragma78@gmail.com>
# SPDX-License-Identifier: MIT
package PBot::Core::Handlers;
use parent 'PBot::Core::Class';
use PBot::Imports;
use PBot::Core::Utils::LoadModules qw/load_modules/;
sub initialize {
my ($self, %conf) = @_;
$self->load_handlers(%conf);
}
sub load_handlers {
my ($self, %conf) = @_;
$self->{pbot}->{logger}->log("Loading handlers:\n");
load_modules($self, 'PBot::Core::Handlers');
}
1;