From 08eeb8b97e96c261b52e55a5426893bc107daccf Mon Sep 17 00:00:00 2001 From: David Phillips Date: Sat, 5 Jan 2019 18:16:51 +1300 Subject: Implement no-reentry request on modules This fixes duplicate URL titles from a `title of` command, and will likely find use in future. --- Plugin/Admin.pm | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'Plugin/Admin.pm') diff --git a/Plugin/Admin.pm b/Plugin/Admin.pm index a4847bc..a5217f7 100644 --- a/Plugin/Admin.pm +++ b/Plugin/Admin.pm @@ -66,7 +66,7 @@ sub is_admin { } sub nick { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; return unless is_admin($logger, $who, $ided); return "Syntax: nick " unless @arguments == 1; @@ -75,7 +75,7 @@ sub nick { } sub say { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; return unless is_admin($logger, $who, $ided); return "Syntax: say " unless @arguments >= 2; @@ -87,7 +87,7 @@ sub say { } sub do_action { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; return unless is_admin($logger, $who, $ided); return "Syntax: action " unless @arguments >= 2; @@ -99,7 +99,7 @@ sub do_action { } sub join_channel { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; return unless is_admin($logger, $who, $ided); return "Syntax: join [channel2 ...]" unless @arguments >= 1; @@ -108,7 +108,7 @@ sub join_channel { } sub part { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; $where = $where->[0] if ref($where) eq "ARRAY"; @@ -129,7 +129,7 @@ sub part { } sub mode { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; $where = $where->[0] if ref($where) eq "ARRAY"; @@ -144,7 +144,7 @@ sub mode { } sub kick { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; $where = $where->[0] if ref($where) eq "ARRAY"; @@ -166,7 +166,7 @@ sub kick { } sub topic { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; return unless is_admin($logger, $who, $ided); return "Syntax: topic " unless @arguments >= 2; @@ -179,7 +179,7 @@ sub topic { } sub reconnect { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; return unless is_admin($logger, $who, $ided); @@ -190,7 +190,7 @@ sub reconnect { } sub ignore { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; return unless is_admin($logger, $who, $ided); return "Syntax: ignore " unless @arguments == 1; @@ -201,7 +201,7 @@ sub ignore { } sub do_not_ignore { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; return unless is_admin($logger, $who, $ided); return "Syntax: don't ignore " unless @arguments == 1; @@ -217,7 +217,7 @@ sub do_not_ignore { } sub dump_ignore { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; return "Syntax: who are you ignoring?" unless @arguments == 0; @@ -226,7 +226,7 @@ sub dump_ignore { } sub prefix_rm { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; return unless is_admin($logger, $who, $ided); @@ -240,7 +240,7 @@ sub prefix_rm { } sub prefix_set { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; return unless is_admin($logger, $who, $ided); @@ -251,7 +251,7 @@ sub prefix_set { } sub exit { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; return unless is_admin($logger, $who, $ided); return "Syntax: exit" unless @arguments == 0; @@ -260,12 +260,12 @@ sub exit { } sub dump_plugins { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; return "Active plugins: " . join ", ", @{$root_config->{active_plugins}}; } sub unload_plugin { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; return unless is_admin($logger, $who, $ided); return "Syntax: unload " unless @arguments == 1; @@ -278,7 +278,7 @@ sub unload_plugin { } sub load_plugin { - my ($self, $irc, $logger, $who, $where, $ided, $rest, @arguments) = @_; + my ($self, $irc, $logger, $who, $where, $ided, $rest, $no_reenter, @arguments) = @_; return unless is_admin($logger, $who, $ided); return "Syntax: load " unless @arguments == 1; -- cgit v1.1