2021-07-23 17:01:18 -07:00
|
|
|
# File: Handlers.pm
|
|
|
|
#
|
|
|
|
# Purpose: Loads handlers in the Handlers directory.
|
|
|
|
|
2023-02-20 21:31:52 -08:00
|
|
|
# SPDX-FileCopyrightText: 2001-2023 Pragmatic Software <pragma78@gmail.com>
|
2021-07-23 17:01:18 -07:00
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
package PBot::Core::Handlers;
|
|
|
|
use parent 'PBot::Core::Class';
|
|
|
|
|
|
|
|
use PBot::Imports;
|
2021-07-23 19:22:25 -07:00
|
|
|
use PBot::Core::Utils::LoadModules qw/load_modules/;
|
2021-07-23 17:01:18 -07:00
|
|
|
|
2023-04-13 21:04:12 -07:00
|
|
|
sub initialize($self, %conf) {
|
2021-07-23 18:26:45 -07:00
|
|
|
$self->load_handlers(%conf);
|
2021-07-23 17:01:18 -07:00
|
|
|
}
|
|
|
|
|
2023-04-13 21:04:12 -07:00
|
|
|
sub load_handlers($self, %conf) {
|
2021-07-23 18:26:45 -07:00
|
|
|
$self->{pbot}->{logger}->log("Loading handlers:\n");
|
2021-07-23 17:01:18 -07:00
|
|
|
load_modules($self, 'PBot::Core::Handlers');
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|