3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02:00

Plugins: __PACKAGE__ no longer necessary in unload()

This commit is contained in:
Pragmatic Software 2020-02-07 20:48:09 -08:00
parent bcacab7af2
commit 39e98db663
15 changed files with 33 additions and 33 deletions

View File

@ -72,12 +72,12 @@ sub unload {
$self->dbi_end;
$self->{pbot}->{commands}->unregister('actiontrigger');
$self->{pbot}->{capabilities}->remove('can-actiontrigger');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.join', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.join');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick');
}
sub create_database {

View File

@ -38,8 +38,8 @@ sub initialize {
sub unload {
my ($self) = @_;
$self->{pbot}->{event_dispatcher}->remove_handler('irc.nick', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.nick');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction');
}
sub on_nickchange {

View File

@ -40,8 +40,8 @@ sub initialize {
sub unload {
my ($self) = @_;
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.join', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.join');
}
sub on_kick {

View File

@ -37,8 +37,8 @@ sub initialize {
sub unload {
my ($self) = @_;
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction');
}
sub on_action {

View File

@ -45,8 +45,8 @@ sub initialize {
sub unload {
my $self = shift;
$self->{pbot}->{timer}->unregister('antirepeat');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction');
}
sub on_public {

View File

@ -40,7 +40,7 @@ sub initialize {
sub unload {
my ($self) = @_;
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public');
}
sub on_public {

View File

@ -39,8 +39,8 @@ sub initialize {
sub unload {
my ($self) = @_;
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part');
}
sub rejoin_channel {

View File

@ -54,9 +54,9 @@ sub unload {
my $self = shift;
$self->{pbot}->{commands}->unregister('battleship');
$self->{pbot}->{timer}->unregister('battleship timer');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick');
}
sub on_kick {

View File

@ -48,9 +48,9 @@ sub unload {
my $self = shift;
$self->{pbot}->{commands}->unregister('connect4');
$self->{pbot}->{timer}->unregister('connect4 timer');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick');
}
sub on_kick {

View File

@ -52,7 +52,7 @@ sub unload {
$self->{pbot}->{commands}->unregister('counterlist');
$self->{pbot}->{commands}->unregister('countertrigger');
$self->{pbot}->{capabilities}->remove('can-countertrigger');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public');
}
sub create_database {

View File

@ -27,7 +27,7 @@ sub initialize {
sub unload {
my $self = shift;
# perform plugin clean-up here
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public');
}
sub on_public {

View File

@ -30,7 +30,7 @@ sub initialize {
sub unload {
my $self = shift;
$self->{pbot}->{timer}->unregister('RelayUnreg');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public');
}
sub on_public {

View File

@ -86,9 +86,9 @@ sub unload {
$self->{pbot}->{commands}->unregister('spinach');
$self->{pbot}->{timer}->unregister('spinach timer');
$self->{stats}->end if $self->{stats_running};
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick');
}
sub on_kick {

View File

@ -39,8 +39,8 @@ sub initialize {
sub unload {
my ($self) = @_;
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction');
}
sub on_public {

View File

@ -38,8 +38,8 @@ sub initialize {
sub unload {
my ($self) = @_;
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction', __PACKAGE__);
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public');
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction');
}
sub show_url_titles {