From 39e98db6632937436c2db4b15a72fd2a3ffa6aa2 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Fri, 7 Feb 2020 20:48:09 -0800 Subject: [PATCH] Plugins: __PACKAGE__ no longer necessary in unload() --- Plugins/ActionTrigger.pm | 12 ++++++------ Plugins/AntiAway.pm | 4 ++-- Plugins/AntiKickAutoRejoin.pm | 4 ++-- Plugins/AntiNickSpam.pm | 4 ++-- Plugins/AntiRepeat.pm | 4 ++-- Plugins/AntiTwitter.pm | 2 +- Plugins/AutoRejoin.pm | 4 ++-- Plugins/Battleship.pm | 6 +++--- Plugins/Connect4.pm | 6 +++--- Plugins/Counter.pm | 2 +- Plugins/Example.pm | 2 +- Plugins/RelayUnreg.pm | 2 +- Plugins/Spinach.pm | 6 +++--- Plugins/TypoSub.pm | 4 ++-- Plugins/UrlTitles.pm | 4 ++-- 15 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Plugins/ActionTrigger.pm b/Plugins/ActionTrigger.pm index 60e2e353..564b13bf 100644 --- a/Plugins/ActionTrigger.pm +++ b/Plugins/ActionTrigger.pm @@ -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 { diff --git a/Plugins/AntiAway.pm b/Plugins/AntiAway.pm index 83d2d859..354777a1 100644 --- a/Plugins/AntiAway.pm +++ b/Plugins/AntiAway.pm @@ -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 { diff --git a/Plugins/AntiKickAutoRejoin.pm b/Plugins/AntiKickAutoRejoin.pm index a79410d5..6d6ad4e3 100644 --- a/Plugins/AntiKickAutoRejoin.pm +++ b/Plugins/AntiKickAutoRejoin.pm @@ -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 { diff --git a/Plugins/AntiNickSpam.pm b/Plugins/AntiNickSpam.pm index 1d61bbcf..87002f00 100644 --- a/Plugins/AntiNickSpam.pm +++ b/Plugins/AntiNickSpam.pm @@ -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 { diff --git a/Plugins/AntiRepeat.pm b/Plugins/AntiRepeat.pm index e35ca36e..adc64b3d 100644 --- a/Plugins/AntiRepeat.pm +++ b/Plugins/AntiRepeat.pm @@ -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 { diff --git a/Plugins/AntiTwitter.pm b/Plugins/AntiTwitter.pm index ceeff269..08d0ed40 100644 --- a/Plugins/AntiTwitter.pm +++ b/Plugins/AntiTwitter.pm @@ -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 { diff --git a/Plugins/AutoRejoin.pm b/Plugins/AutoRejoin.pm index c79d363b..09bae665 100644 --- a/Plugins/AutoRejoin.pm +++ b/Plugins/AutoRejoin.pm @@ -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 { diff --git a/Plugins/Battleship.pm b/Plugins/Battleship.pm index 7e94717b..bbd31d24 100644 --- a/Plugins/Battleship.pm +++ b/Plugins/Battleship.pm @@ -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 { diff --git a/Plugins/Connect4.pm b/Plugins/Connect4.pm index cf1f0dca..ac0b0764 100644 --- a/Plugins/Connect4.pm +++ b/Plugins/Connect4.pm @@ -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 { diff --git a/Plugins/Counter.pm b/Plugins/Counter.pm index ca2f9861..14efafec 100644 --- a/Plugins/Counter.pm +++ b/Plugins/Counter.pm @@ -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 { diff --git a/Plugins/Example.pm b/Plugins/Example.pm index 3431dd24..9cb90736 100644 --- a/Plugins/Example.pm +++ b/Plugins/Example.pm @@ -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 { diff --git a/Plugins/RelayUnreg.pm b/Plugins/RelayUnreg.pm index a2c0c9e9..42f8ad91 100644 --- a/Plugins/RelayUnreg.pm +++ b/Plugins/RelayUnreg.pm @@ -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 { diff --git a/Plugins/Spinach.pm b/Plugins/Spinach.pm index 4c44df1b..2710f896 100644 --- a/Plugins/Spinach.pm +++ b/Plugins/Spinach.pm @@ -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 { diff --git a/Plugins/TypoSub.pm b/Plugins/TypoSub.pm index 2d9c5d0c..015c5b7a 100644 --- a/Plugins/TypoSub.pm +++ b/Plugins/TypoSub.pm @@ -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 { diff --git a/Plugins/UrlTitles.pm b/Plugins/UrlTitles.pm index 232e8b89..a791da92 100644 --- a/Plugins/UrlTitles.pm +++ b/Plugins/UrlTitles.pm @@ -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 {