mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-20 10:59:29 +01:00
Plugins: __PACKAGE__ no longer necessary in unload()
This commit is contained in:
parent
bcacab7af2
commit
39e98db663
@ -72,12 +72,12 @@ sub unload {
|
|||||||
$self->dbi_end;
|
$self->dbi_end;
|
||||||
$self->{pbot}->{commands}->unregister('actiontrigger');
|
$self->{pbot}->{commands}->unregister('actiontrigger');
|
||||||
$self->{pbot}->{capabilities}->remove('can-actiontrigger');
|
$self->{pbot}->{capabilities}->remove('can-actiontrigger');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.join', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.join');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick');
|
||||||
}
|
}
|
||||||
|
|
||||||
sub create_database {
|
sub create_database {
|
||||||
|
@ -38,8 +38,8 @@ sub initialize {
|
|||||||
|
|
||||||
sub unload {
|
sub unload {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.nick', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.nick');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction');
|
||||||
}
|
}
|
||||||
|
|
||||||
sub on_nickchange {
|
sub on_nickchange {
|
||||||
|
@ -40,8 +40,8 @@ sub initialize {
|
|||||||
|
|
||||||
sub unload {
|
sub unload {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.join', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.join');
|
||||||
}
|
}
|
||||||
|
|
||||||
sub on_kick {
|
sub on_kick {
|
||||||
|
@ -37,8 +37,8 @@ sub initialize {
|
|||||||
|
|
||||||
sub unload {
|
sub unload {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction');
|
||||||
}
|
}
|
||||||
|
|
||||||
sub on_action {
|
sub on_action {
|
||||||
|
@ -45,8 +45,8 @@ sub initialize {
|
|||||||
sub unload {
|
sub unload {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->{pbot}->{timer}->unregister('antirepeat');
|
$self->{pbot}->{timer}->unregister('antirepeat');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction');
|
||||||
}
|
}
|
||||||
|
|
||||||
sub on_public {
|
sub on_public {
|
||||||
|
@ -40,7 +40,7 @@ sub initialize {
|
|||||||
|
|
||||||
sub unload {
|
sub unload {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public');
|
||||||
}
|
}
|
||||||
|
|
||||||
sub on_public {
|
sub on_public {
|
||||||
|
@ -39,8 +39,8 @@ sub initialize {
|
|||||||
|
|
||||||
sub unload {
|
sub unload {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part');
|
||||||
}
|
}
|
||||||
|
|
||||||
sub rejoin_channel {
|
sub rejoin_channel {
|
||||||
|
@ -54,9 +54,9 @@ sub unload {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->{pbot}->{commands}->unregister('battleship');
|
$self->{pbot}->{commands}->unregister('battleship');
|
||||||
$self->{pbot}->{timer}->unregister('battleship timer');
|
$self->{pbot}->{timer}->unregister('battleship timer');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick');
|
||||||
}
|
}
|
||||||
|
|
||||||
sub on_kick {
|
sub on_kick {
|
||||||
|
@ -48,9 +48,9 @@ sub unload {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->{pbot}->{commands}->unregister('connect4');
|
$self->{pbot}->{commands}->unregister('connect4');
|
||||||
$self->{pbot}->{timer}->unregister('connect4 timer');
|
$self->{pbot}->{timer}->unregister('connect4 timer');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick');
|
||||||
}
|
}
|
||||||
|
|
||||||
sub on_kick {
|
sub on_kick {
|
||||||
|
@ -52,7 +52,7 @@ sub unload {
|
|||||||
$self->{pbot}->{commands}->unregister('counterlist');
|
$self->{pbot}->{commands}->unregister('counterlist');
|
||||||
$self->{pbot}->{commands}->unregister('countertrigger');
|
$self->{pbot}->{commands}->unregister('countertrigger');
|
||||||
$self->{pbot}->{capabilities}->remove('can-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 {
|
sub create_database {
|
||||||
|
@ -27,7 +27,7 @@ sub initialize {
|
|||||||
sub unload {
|
sub unload {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
# perform plugin clean-up here
|
# 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 {
|
sub on_public {
|
||||||
|
@ -30,7 +30,7 @@ sub initialize {
|
|||||||
sub unload {
|
sub unload {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->{pbot}->{timer}->unregister('RelayUnreg');
|
$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 {
|
sub on_public {
|
||||||
|
@ -86,9 +86,9 @@ sub unload {
|
|||||||
$self->{pbot}->{commands}->unregister('spinach');
|
$self->{pbot}->{commands}->unregister('spinach');
|
||||||
$self->{pbot}->{timer}->unregister('spinach timer');
|
$self->{pbot}->{timer}->unregister('spinach timer');
|
||||||
$self->{stats}->end if $self->{stats_running};
|
$self->{stats}->end if $self->{stats_running};
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.part');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.quit');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.kick');
|
||||||
}
|
}
|
||||||
|
|
||||||
sub on_kick {
|
sub on_kick {
|
||||||
|
@ -39,8 +39,8 @@ sub initialize {
|
|||||||
|
|
||||||
sub unload {
|
sub unload {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction');
|
||||||
}
|
}
|
||||||
|
|
||||||
sub on_public {
|
sub on_public {
|
||||||
|
@ -38,8 +38,8 @@ sub initialize {
|
|||||||
|
|
||||||
sub unload {
|
sub unload {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.public');
|
||||||
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction', __PACKAGE__);
|
$self->{pbot}->{event_dispatcher}->remove_handler('irc.caction');
|
||||||
}
|
}
|
||||||
|
|
||||||
sub show_url_titles {
|
sub show_url_titles {
|
||||||
|
Loading…
Reference in New Issue
Block a user